1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

ss: h2: leave the ss bound to its affiliated wsi until close clears it

In sai, on Xenial (only...) noticed that the wsi is still bound to the ss
handle, and can reference it even after the ss has been destroyed on
ss-testsfail sometimes.

Leave the handle knowing its wsi and able to detach it later during close.
This commit is contained in:
Andy Green 2021-05-07 11:11:06 +01:00
parent 3016385671
commit a3765d118c

View file

@ -84,8 +84,7 @@ secstream_h2(struct lws *wsi, enum lws_callback_reasons reason, void *user,
r = 0;
if (h->hanging_som)
r = h->info.rx(ss_to_userobj(h), NULL, 0, LWSSS_FLAG_EOM);
/* decouple the fates of the wsi and the ss */
h->wsi = NULL;
h->txn_ok = 1;
lws_cancel_service(lws_get_context(wsi)); /* abort poll wait */
if (h->hanging_som && r == LWSSSSRET_DESTROY_ME)