mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
ws-over-h2: unbreak
This commit is contained in:
parent
9b35bc171b
commit
5760a562d8
2 changed files with 4 additions and 5 deletions
|
@ -2133,7 +2133,7 @@ fail_length:
|
|||
int
|
||||
lws_h2_ws_handshake(struct lws *wsi)
|
||||
{
|
||||
uint8_t buf[LWS_PRE + 384], *p = buf + LWS_PRE, *start = p,
|
||||
uint8_t buf[LWS_PRE + 2048], *p = buf + LWS_PRE, *start = p,
|
||||
*end = &buf[sizeof(buf) - 1];
|
||||
const struct lws_http_mount *hit;
|
||||
const char * uri_ptr;
|
||||
|
|
|
@ -269,10 +269,7 @@ lws_process_ws_upgrade(struct lws *wsi)
|
|||
|
||||
lws_pt_lock(pt, __func__);
|
||||
|
||||
if (wsi->h2_stream_carries_ws)
|
||||
lws_role_transition(wsi, LWSIFR_SERVER | LWSIFR_P_ENCAP_H2,
|
||||
LRS_ESTABLISHED, &role_ops_ws);
|
||||
else
|
||||
if (!wsi->h2_stream_carries_ws)
|
||||
lws_role_transition(wsi, LWSIFR_SERVER, LRS_ESTABLISHED,
|
||||
&role_ops_ws);
|
||||
|
||||
|
@ -406,6 +403,8 @@ lws_process_ws_upgrade(struct lws *wsi)
|
|||
lwsl_notice("h2 ws handshake failed\n");
|
||||
return 1;
|
||||
}
|
||||
lws_role_transition(wsi, LWSIFR_SERVER | LWSIFR_P_ENCAP_H2,
|
||||
LRS_ESTABLISHED, &role_ops_ws);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue