From 92b83ddffb1bbd51a929003afe6c875f77be0bad Mon Sep 17 00:00:00 2001 From: Mike Kaplinskiy Date: Sun, 29 Aug 2010 18:09:49 -0400 Subject: [PATCH] server: Don't cache sockets until they are pollable. --- server/sock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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;