mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
defer ESTABLISHED until after mode is WS_SERVING
This commit is contained in:
parent
0aa382f6fb
commit
fee9f006f6
2 changed files with 13 additions and 13 deletions
|
@ -260,19 +260,6 @@ handshake_0405(struct lws_context *context, struct lws *wsi)
|
||||||
wsi->state = LWSS_ESTABLISHED;
|
wsi->state = LWSS_ESTABLISHED;
|
||||||
wsi->lws_rx_parse_state = LWS_RXPS_NEW;
|
wsi->lws_rx_parse_state = LWS_RXPS_NEW;
|
||||||
|
|
||||||
/* notify user code that we're ready to roll */
|
|
||||||
|
|
||||||
if (wsi->protocol->callback)
|
|
||||||
if (wsi->protocol->callback(wsi, LWS_CALLBACK_ESTABLISHED,
|
|
||||||
wsi->user_space,
|
|
||||||
#ifdef LWS_OPENSSL_SUPPORT
|
|
||||||
wsi->ssl,
|
|
||||||
#else
|
|
||||||
NULL,
|
|
||||||
#endif
|
|
||||||
0))
|
|
||||||
goto bail;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
13
lib/server.c
13
lib/server.c
|
@ -1279,6 +1279,19 @@ upgrade_ws:
|
||||||
lwsl_parser("accepted v%02d connection\n",
|
lwsl_parser("accepted v%02d connection\n",
|
||||||
wsi->ietf_spec_revision);
|
wsi->ietf_spec_revision);
|
||||||
|
|
||||||
|
/* notify user code that we're ready to roll */
|
||||||
|
|
||||||
|
if (wsi->protocol->callback)
|
||||||
|
if (wsi->protocol->callback(wsi, LWS_CALLBACK_ESTABLISHED,
|
||||||
|
wsi->user_space,
|
||||||
|
#ifdef LWS_OPENSSL_SUPPORT
|
||||||
|
wsi->ssl,
|
||||||
|
#else
|
||||||
|
NULL,
|
||||||
|
#endif
|
||||||
|
0))
|
||||||
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} /* while all chars are handled */
|
} /* while all chars are handled */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue