* 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:
@ -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 ());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user