libwebsockets
libwebsockets copied to clipboard
webockets over h2 is not closed in chrome on refresh
Hi @lws-team I opened a bug with Chrome because websocket/h2 connection is not closed on page refresh. Adding ticket number for visibility
https://bugs.chromium.org/p/chromium/issues/detail?id=1325702
I think you mean just the logical ws stream, but just in case, for h2, closing the physical connection when navigating away might be an implementation thing. Eg the browser itself may choose to piggyback new connections to exactly the same URL + headers to the same underlying h2 tcp connection, and tolerate some idle time on the underlying tcp connection when it has no child streams / tabs open on it.
The browser would have to close any logical ws / child stream belonging to the page if the page navigated away (I think this is what you actually mean) or refreshed though or that'd definitely be a bug. FFOX had a similar bug back in the day when they were struggling with initial implementation of ws + h2 which I know because they reached, out since lws was the only implementation at that time.
Yes that's what I meant. I do understand some type of persistence at the h2/tcp level but websocket should be destroyed/closed on refresh or tab closed in my opinion. Let me update the chromium bug so this is clear there too. thanks