Commit 0d5f1ab2 authored by Stephane Lussier's avatar Stephane Lussier Committed by Alexandre Julliard

Socket returned by accept function of Microsoft API should keep the

properties of the listening socket. This is also true for non-blocking property.
parent 8e264368
......@@ -338,8 +338,12 @@ static struct object *accept_socket( int handle )
return NULL;
}
/* newly created socket gets the same properties of the listening socket */
fcntl(acceptfd, F_SETFL, O_NONBLOCK); /* make socket nonblocking */
acceptsock->obj.fd = acceptfd;
acceptsock->state = WS_FD_CONNECTED|WS_FD_READ|WS_FD_WRITE;
if (sock->state & WS_FD_NONBLOCKING)
acceptsock->state |= WS_FD_NONBLOCKING;
acceptsock->mask = sock->mask;
acceptsock->hmask = 0;
acceptsock->pmask = 0;
......
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