Skip to content
Snippets Groups Projects
Commit 8600ffaf authored by rswindell's avatar rswindell
Browse files

close_socket() doesn't try to close invalid socket descriptors.

parent 7b15b131
No related branches found
No related tags found
No related merge requests found
......@@ -201,6 +201,9 @@ static int close_socket(SOCKET sock)
{
int result;
if(sock==INVALID_SOCKET)
return(-1);
shutdown(sock,SHUT_RDWR); /* required on Unix */
result=closesocket(sock);
if(/* result==0 && */ startup!=NULL && startup->socket_open!=NULL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment