diff --git a/lib/secure-streams/protocols/ss-h1.c b/lib/secure-streams/protocols/ss-h1.c index 20408b7a8..46e07d45a 100644 --- a/lib/secure-streams/protocols/ss-h1.c +++ b/lib/secure-streams/protocols/ss-h1.c @@ -195,6 +195,9 @@ secstream_h1(struct lws *wsi, enum lws_callback_reasons reason, void *user, if (h->policy && !(h->policy->flags & LWSSSPOLF_OPPORTUNISTIC) && !h->txn_ok && !wsi->context->being_destroyed) lws_ss_backoff(h); + else + h->seqstate = SSSEQ_IDLE; + if (lws_ss_event_helper(h, LWSSSCS_DISCONNECTED)) lws_ss_destroy(&h); break;