From: Lars Op den Kamp Date: Thu, 22 Mar 2012 13:03:33 +0000 (+0100) Subject: cec: reset m_socket to INVALID_SERIAL_SOCKET_VALUE after closing the connection X-Git-Tag: upstream/2.2.0~1^2~31^2~56 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=4da0e7f1706c435df1c405527c74e1b2b3108e04;p=deb_libcec.git cec: reset m_socket to INVALID_SERIAL_SOCKET_VALUE after closing the connection --- diff --git a/src/lib/platform/windows/serialport.cpp b/src/lib/platform/windows/serialport.cpp index f2d28c5..c0cdd93 100644 --- a/src/lib/platform/windows/serialport.cpp +++ b/src/lib/platform/windows/serialport.cpp @@ -86,12 +86,14 @@ void CSerialSocket::Close(void) { if (IsOpen()) SerialSocketClose(m_socket); + m_socket = INVALID_SERIAL_SOCKET_VALUE; } void CSerialSocket::Shutdown(void) { if (IsOpen()) SerialSocketClose(m_socket); + m_socket = INVALID_SERIAL_SOCKET_VALUE; } ssize_t CSerialSocket::Write(void* data, size_t len)