Commit cf5188b6 authored by Alexandre Julliard's avatar Alexandre Julliard

Attempt at fixing POLLHUP handling for Linux 2.2.x.

parent 8438d9fc
...@@ -304,6 +304,8 @@ static void sock_poll_event( struct object *obj, int event ) ...@@ -304,6 +304,8 @@ static void sock_poll_event( struct object *obj, int event )
} }
} }
else if (event & POLLHUP) empty_recv = 1;
if (event & POLLOUT) if (event & POLLOUT)
{ {
sock->pmask |= FD_WRITE; sock->pmask |= FD_WRITE;
...@@ -325,7 +327,7 @@ static void sock_poll_event( struct object *obj, int event ) ...@@ -325,7 +327,7 @@ static void sock_poll_event( struct object *obj, int event )
else if ( empty_recv && (sock->state & (FD_READ|FD_WRITE) )) else if ( empty_recv && (sock->state & (FD_READ|FD_WRITE) ))
{ {
sock->errors[FD_CLOSE_BIT] = sock_error( sock->obj.fd ); sock->errors[FD_CLOSE_BIT] = sock_error( sock->obj.fd );
if ( event & ( POLLERR|POLLHUP ) ) if ( event & POLLERR)
sock->state &= ~(FD_WINE_CONNECTED|FD_WRITE); sock->state &= ~(FD_WINE_CONNECTED|FD_WRITE);
sock->pmask |= FD_CLOSE; sock->pmask |= FD_CLOSE;
sock->hmask |= FD_CLOSE; sock->hmask |= FD_CLOSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment