lwsl_parser("libwebsocket_parse sees parsing complete\n");
wsi->mode = LWS_CONNMODE_PRE_WS_SERVING_ACCEPT;
+ libwebsocket_set_timeout(wsi, NO_PENDING_TIMEOUT, 0);
/* is this websocket protocol or normal http 1.0? */
new_wsi->sock = accept_fd;
+ /* the transport is accepted... give him time to negotiate */
+ libwebsocket_set_timeout(new_wsi,
+ PENDING_TIMEOUT_ESTABLISH_WITH_SERVER,
+ AWAITING_TIMEOUT);
+
/*
* A new connection was accepted. Give the user a chance to
* set properties of the newly created wsi. There's no protocol
}
accepted:
- /* OK, we are accepted */
-
- libwebsocket_set_timeout(wsi, NO_PENDING_TIMEOUT, 0);
+ /* OK, we are accepted... give him some time to negotiate */
+ libwebsocket_set_timeout(wsi,
+ PENDING_TIMEOUT_ESTABLISH_WITH_SERVER,
+ AWAITING_TIMEOUT);
wsi->mode = LWS_CONNMODE_HTTP_SERVING;