mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
ws-over-h2: disable validity checking on encapsulated wsi
The h2 nwsi is subject to its own validity checking PINGs, we don't need to also do them to encapsulated ws-over-h2
This commit is contained in:
parent
6786ce9e33
commit
38e43bb51e
2 changed files with 11 additions and 1 deletions
|
@ -351,6 +351,7 @@ lws_validity_confirmed(struct lws *wsi)
|
|||
* to the role to figure out who actually needs to understand their
|
||||
* validity was confirmed.
|
||||
*/
|
||||
if (wsi->role_ops && wsi->role_ops->issue_keepalive)
|
||||
if (!wsi->h2_stream_carries_ws && /* only if not encapsulated */
|
||||
wsi->role_ops && wsi->role_ops->issue_keepalive)
|
||||
wsi->role_ops->issue_keepalive(wsi, 1);
|
||||
}
|
||||
|
|
|
@ -351,6 +351,15 @@ lws_process_ws_upgrade2(struct lws *wsi)
|
|||
lws_role_transition(wsi,
|
||||
LWSIFR_SERVER | LWSIFR_P_ENCAP_H2,
|
||||
LRS_ESTABLISHED, &role_ops_ws);
|
||||
|
||||
/*
|
||||
* There should be no validity checking since we
|
||||
* are encapsulated in something else with its own
|
||||
* validity checking
|
||||
*/
|
||||
|
||||
__lws_sul_insert(&pt->pt_sul_owner, &wsi->sul_validity,
|
||||
LWS_SET_TIMER_USEC_CANCEL);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue