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:
parent
04de0f77d3
commit
fa17059787
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue