diff --git a/server/sock.c b/server/sock.c index 02f4a6db70e..7e1cd7e3fe5 100644 --- a/server/sock.c +++ b/server/sock.c @@ -248,6 +248,7 @@ static int sock_reselect( struct sock *sock ) if (!(sock->state & ~FD_WINE_NONBLOCKING)) return 0; /* ok, it is, attach it to the wineserver's main poll loop */ sock->polling = 1; + allow_fd_caching( sock->fd ); } /* update condition mask */ set_fd_events( sock->fd, ev ); @@ -646,7 +647,6 @@ static struct object *create_socket( int family, int type, int protocol, unsigne release_object( sock ); return NULL; } - allow_fd_caching( sock->fd ); sock_reselect( sock ); clear_error(); return &sock->obj; @@ -719,7 +719,6 @@ static struct sock *accept_socket( obj_handle_t handle ) release_object( sock ); return NULL; } - allow_fd_caching( acceptsock->fd ); } clear_error(); sock->pmask &= ~FD_ACCEPT;