Move TcpSocket's m_retxEvent.Cancel() to ~TcpSocket(), so that it is executed by all possible code paths leading up to a TcpSocket deallocation.
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Wed Feb 06 17:11:56 2008 +0000 (2008-02-06)
changeset 2318d4217d7ba4ba
parent 2317 e4fc78d60b6b
child 2320 67998ee2a41e
Move TcpSocket's m_retxEvent.Cancel() to ~TcpSocket(), so that it is executed by all possible code paths leading up to a TcpSocket deallocation.
src/internet-node/tcp-socket.cc
     1.1 --- a/src/internet-node/tcp-socket.cc	Tue Feb 05 15:30:16 2008 -0500
     1.2 +++ b/src/internet-node/tcp-socket.cc	Wed Feb 06 17:11:56 2008 +0000
     1.3 @@ -98,6 +98,7 @@
     1.4      }
     1.5    m_tcp = 0;
     1.6    delete m_pendingData; //prevents leak
     1.7 +  m_retxEvent.Cancel ();
     1.8  }
     1.9  
    1.10  enum Socket::SocketErrno
    1.11 @@ -121,7 +122,6 @@
    1.12    m_node = 0;
    1.13    m_endPoint = 0;
    1.14    m_tcp = 0;
    1.15 -  m_retxEvent.Cancel ();
    1.16  }
    1.17  int
    1.18  TcpSocket::FinishBind (void)