Fix memory leak when outbound socket is closed by server

ESL-88 --resolve

Signed-off-by: Travis Cross <tc@traviscross.com>
This commit is contained in:
Ico
2014-03-25 12:31:23 +02:00
committed by Travis Cross
parent b96946822d
commit 73790b4f0d
+2 -3
View File
@@ -50,10 +50,9 @@ ESLconnection::ESLconnection(int socket)
ESLconnection::~ESLconnection()
{
if (handle.connected) {
if (!handle.destroyed) {
esl_disconnect(&handle);
}
}
int ESLconnection::socketDescriptor()
@@ -68,7 +67,7 @@ int ESLconnection::socketDescriptor()
int ESLconnection::disconnect()
{
if (handle.connected) {
if (!handle.destroyed) {
return esl_disconnect(&handle);
}