mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
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:
parent
0755786037
commit
26b28a88f9
1 changed files with 12 additions and 2 deletions
|
@ -73,7 +73,17 @@ pqissllistenbase::pqissllistenbase(const struct sockaddr_storage &addr, p3PeerMg
|
||||||
|
|
||||||
pqissllistenbase::~pqissllistenbase()
|
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()
|
int pqissllistenbase::tick()
|
||||||
|
@ -287,7 +297,7 @@ int pqissllistenbase::resetlisten()
|
||||||
closesocket(lsock);
|
closesocket(lsock);
|
||||||
#endif
|
#endif
|
||||||
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
|
lsock = -1;
|
||||||
active = false;
|
active = false;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue