From dd9c2b70d3d0577d2044f10a513605313ddaa19f Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 12 Nov 2014 21:36:14 +0100 Subject: [PATCH] Update Csocket to b5185dc > Fix IsConnected() to return false when Disconnected() gets called --- src/Csocket.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Csocket.cpp b/src/Csocket.cpp index c483ebf9..d690ad5f 100644 --- a/src/Csocket.cpp +++ b/src/Csocket.cpp @@ -3410,7 +3410,10 @@ void CSocketManager::DelSock( size_t iPos ) if( pSock->GetCloseType() != Csock::CLT_DEREFERENCE ) { if( pSock->IsConnected() ) + { + pSock->SetIsConnected( false ); pSock->Disconnected(); // only call disconnected event if connected event was called (IE IsConnected was set) + } m_iBytesRead += pSock->GetBytesRead(); m_iBytesWritten += pSock->GetBytesWritten();