* fhandler_socket.cc (fhandler_socket::close): Add error handling.

Fixed ChangeLog entries.
This commit is contained in:
Corinna Vinschen
2001-10-30 11:48:36 +00:00
parent fc79ce17c7
commit 05230a4a29
2 changed files with 13 additions and 2 deletions

View File

@ -289,9 +289,14 @@ fhandler_socket::close ()
setsockopt (get_socket (), SOL_SOCKET, SO_LINGER,
(const char *)&linger, sizeof linger);
while (closesocket (get_socket ())
while ((res = closesocket (get_socket ()))
&& WSAGetLastError () == WSAEWOULDBLOCK)
continue;
if (res)
{
set_winsock_errno ();
res = -1;
}
close_secret_event ();