added missing socket close in pqissllistenbase destructor

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8489 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
electron128 2015-06-16 13:41:42 +00:00
parent 0755786037
commit 26b28a88f9

View File

@ -73,7 +73,17 @@ pqissllistenbase::pqissllistenbase(const struct sockaddr_storage &addr, p3PeerMg
pqissllistenbase::~pqissllistenbase()
{
return;
if(lsock != -1)
{
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
#ifndef WINDOWS_SYS // ie UNIX
shutdown(lsock, SHUT_RDWR);
close(lsock);
#else //WINDOWS_SYS
closesocket(lsock);
#endif
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
}
}
int pqissllistenbase::tick()
@ -287,7 +297,7 @@ int pqissllistenbase::resetlisten()
closesocket(lsock);
#endif
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
lsock = -1;
active = false;
return 1;
}