Permalink
Browse files

fixed crash on exit when the socket couldn't be opened. closes #101

  • Loading branch information...
1 parent 4b13da3 commit 107fe13520d4a23b33ef0504a810c8411078328e @opdenkamp committed Dec 11, 2012
Showing with 1 addition and 2 deletions.
  1. +0 −1 lib/platform/sockets/socket.h
  2. +1 −1 lib/platform/sockets/tcp.h
@@ -109,7 +109,6 @@ namespace PLATFORM
virtual ~CProtectedSocket(void)
{
- Close();
delete m_socket;
}
@@ -44,7 +44,7 @@ namespace PLATFORM
CCommonSocket<tcp_socket_t>(INVALID_SOCKET_VALUE, strHostname),
m_iPort(iPort) {}
- virtual ~CTcpSocket(void) {}
+ virtual ~CTcpSocket(void) { Close(); }
virtual bool Open(uint64_t iTimeoutMs = 0)
{

0 comments on commit 107fe13

Please sign in to comment.