X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/64be91ed99c3493fa5ce93740c597d22cd1e83a5..85ee88cd536cbf8b347e58f84b160b60204ed157:/src/common/sckipc.cpp diff --git a/src/common/sckipc.cpp b/src/common/sckipc.cpp index 8348ec749f..0f1173baa6 100644 --- a/src/common/sckipc.cpp +++ b/src/common/sckipc.cpp @@ -92,7 +92,7 @@ GetAddressFromName(const wxString& serverName, #if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__) // under Unix, if the server name looks like a path, create a AF_UNIX // socket instead of AF_INET one - if ( serverName.Find(_T('/')) != wxNOT_FOUND ) + if ( serverName.Find(wxT('/')) != wxNOT_FOUND ) { wxUNIXaddress *addr = new wxUNIXaddress; addr->Filename(serverName); @@ -528,7 +528,7 @@ wxTCPServer::~wxTCPServer() { if ( remove(m_filename.fn_str()) != 0 ) { - wxLogDebug(_T("Stale AF_UNIX file '%s' left."), m_filename.c_str()); + wxLogDebug(wxT("Stale AF_UNIX file '%s' left."), m_filename.c_str()); } } #endif // __UNIX_LIKE__ @@ -695,6 +695,11 @@ void wxTCPEventHandler::HandleDisconnect(wxTCPConnection *connection) connection->m_sock->Notify(false); connection->m_sock->Close(); + // don't leave references to this soon-to-be-dangling connection in the + // socket as it won't be destroyed immediately as its destruction will be + // delayed in case there are more events pending for it + connection->m_sock->SetClientData(NULL); + connection->SetConnected(false); connection->OnDisconnect(); }