Browse code

webkernel: when accepting sockets, do a sock_setsafe() on them just in case the server socket is unsafe (if socket is unsafe, that is NOLINGER, the last bytes of a reply would not be sent)

Dario Rodriguez authored on 18/05/2015 19:41:18
Showing 1 changed files
... ...
@@ -1072,6 +1072,7 @@ wk_accept(_wk *web)
1072 1072
                 return(NULL);
1073 1073
         }
1074 1074
         client->fd=newfd;
1075
+        sock_setsafe(client->fd);
1075 1076
         DEBUG_CONN(("WEBK","wk_accept: connid: %i, fd: %i",client->connid,client->fd));
1076 1077
         FD_SET(client->fd,&(web->fdset));
1077 1078
         sselect_addread(web->ssel,client->fd,(void *)client);