From a3765d118c9ed45f4baf768379c178e4e5f54535 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Fri, 7 May 2021 11:11:06 +0100 Subject: [PATCH] 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. --- lib/secure-streams/protocols/ss-h2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/secure-streams/protocols/ss-h2.c b/lib/secure-streams/protocols/ss-h2.c index df456261e..719115de4 100644 --- a/lib/secure-streams/protocols/ss-h2.c +++ b/lib/secure-streams/protocols/ss-h2.c @@ -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)