* fhandler_socket.cc (fhandler_socket::sendto): Drop out of loop if

has_been_closed gets set.
	(fhandler_socket::sendmsg): Ditto.
	* net.cc (wsock_event::wait): Don't initialize evts.  Don't try to
	evaluate network events if WSAEnumNetworkEvents fails.
	(wsock_event::release): Save last WSA error and set it again unless
	resetting to blocking socket fails.
	* wsock_event.h (class wsock_event): Remove destructor.
This commit is contained in:
Corinna Vinschen
2004-04-01 09:48:15 +00:00
parent fbba4780af
commit 54aefcc6bc
4 changed files with 45 additions and 33 deletions

View File

@ -953,7 +953,8 @@ fhandler_socket::sendto (const void *ptr, size_t len, int flags,
break;
}
}
while (!(res = wsock_evt.wait (get_socket (), has_been_closed)));
while (!(res = wsock_evt.wait (get_socket (), has_been_closed))
&& !has_been_closed);
wsock_evt.release (get_socket ());
}
}
@ -1088,7 +1089,8 @@ fhandler_socket::sendmsg (const struct msghdr *msg, int flags, ssize_t tot)
break;
}
}
while (!(res = wsock_evt.wait (get_socket (), has_been_closed)));
while (!(res = wsock_evt.wait (get_socket (), has_been_closed))
&& !has_been_closed);
wsock_evt.release (get_socket ());
}
}