* fhandler_socket.cc (fhandler_socket::recv_internal): Fix a problem
with poll(2) after shutdown(SHUT_RD) has been called on the local side. * poll.cc (poll): Use POSIX type nfds_t for second parameter. Drop special socket handling for POLLIN. Add comment to explain why. * include/sys/poll.h: Declare nfds_t. Use as type for second parameter in poll(2) declaration.
This commit is contained in:
@ -1160,7 +1160,8 @@ fhandler_socket::recv_internal (WSABUF *wsabuf, DWORD wsacnt, DWORD flags,
|
||||
/* Note: Don't call WSARecvFrom(MSG_PEEK) without actually having data
|
||||
waiting in the buffers, otherwise the event handling gets messed up
|
||||
for some reason. */
|
||||
while (!(res = wait_for_events (evt_mask | FD_CLOSE)))
|
||||
while (!(res = wait_for_events (evt_mask | FD_CLOSE))
|
||||
|| saw_shutdown_read ())
|
||||
{
|
||||
res = WSARecvFrom (get_socket (), wsabuf, wsacnt, &ret,
|
||||
&flags, from, fromlen, NULL, NULL);
|
||||
|
Reference in New Issue
Block a user