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 authored and Travis Cross committed 2014-03-26 01:37:53 +00:00
1 parent b96946822d
commit 73790b4f0d
1 file changed
+2 -3
+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);
}