From afb77240ad025ef4f9da3c4d11e44813d684986e Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 21 Apr 2021 05:14:26 +0100 Subject: [PATCH] h2: just log nwsi close and pass thru User reports problems with the close / retry flow not happening if we don't pass thru the nwsi close... it may be happening before the sid1 migration. Just log it and don't end the handling before the passthru. Logging it because there was a reason for the change to not passing it through... --- lib/secure-streams/protocols/ss-h2.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/secure-streams/protocols/ss-h2.c b/lib/secure-streams/protocols/ss-h2.c index 533cd6393..df456261e 100644 --- a/lib/secure-streams/protocols/ss-h2.c +++ b/lib/secure-streams/protocols/ss-h2.c @@ -66,8 +66,13 @@ secstream_h2(struct lws *wsi, enum lws_callback_reasons reason, void *user, return n; case LWS_CALLBACK_CLOSED_CLIENT_HTTP: - if (lws_get_network_wsi(wsi) == wsi) + /* + * Only allow the wsi that the handle believes is representing + * him to report closure up to h1 + */ + if (!h || h->wsi != wsi) return 0; + break; case LWS_CALLBACK_COMPLETED_CLIENT_HTTP: