Skip to content

Commit

Permalink
Fixed socket leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Dumais committed Jan 12, 2017
1 parent 2986482 commit 51ecf65
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webserver/TcpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ TcpClient::~TcpClient()
}
delete this->txList;
if (this->context != 0) delete this->context;
if (this->mSocket) delete this->mSocket;
if (this->mSocket)
{
this->mSocket->close();
delete this->mSocket;
}
}

ISocket* TcpClient::getSocket()
Expand Down

0 comments on commit 51ecf65

Please sign in to comment.