diff --git a/server/sock.c b/server/sock.c
index 1e9ba5393384f9b7e8b76f54dbcfcf78d2557fa8..1ea2061445ffdba904af032eff4108ef06f0d0ab 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -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;