mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
h2: migration: migrate for_ss
The attribute indicating that a wsi belongs to an SS object also must be migrated when we split out the original transaction wsi into a new nwsi, if we're not going to lose track of its affiliation. Likewise if the affiliated SS object points to the original wsi, we have to migrate his pointer when we migrate the wsi. Taking care of this book-keeping is necessary to get correct behaviours at close-time.
This commit is contained in:
parent
88c824b89d
commit
3016385671
1 changed files with 12 additions and 0 deletions
|
@ -1510,6 +1510,18 @@ lws_h2_parse_end_of_frame(struct lws *wsi)
|
|||
#endif
|
||||
#endif /* CLIENT */
|
||||
|
||||
#if defined(LWS_WITH_SECURE_STREAMS)
|
||||
if (wsi->for_ss) {
|
||||
lws_ss_handle_t *h = (lws_ss_handle_t *)lws_get_opaque_user_data(wsi);
|
||||
|
||||
h2n->swsi->for_ss = 1;
|
||||
wsi->for_ss = 0;
|
||||
|
||||
if (h->wsi == wsi)
|
||||
h->wsi = h2n->swsi;
|
||||
}
|
||||
#endif
|
||||
|
||||
h2n->swsi->a.protocol = wsi->a.protocol;
|
||||
if (h2n->swsi->user_space &&
|
||||
!h2n->swsi->user_space_externally_allocated)
|
||||
|
|
Loading…
Add table
Reference in a new issue