Project

General

Profile

Firefox websocket disconnect/reconnect when downloading resource

Added by Bruce Toll almost 4 years ago

With a Wt session configured to use websockets, I noticed that the websocket will disconnect and reconnect when downloading a resource with various versions of Firefox (e.g. version 77.0.1 on Win10). This can be observed by visiting https://www.webtoolkit.eu/widgets/media/pdf-output and looking at the network tab of the web developer tools (with persist logs) while clicking on the first "Create pdf" button. This disconnect/reconnect is also visible in a Wt server log. There's a 101 status on the GET...request=ws associated with the session followed by a subsequent "wthttp: ws: connect with protocol version 13".

I have not observed this issue with other browsers. It also does not occur with Firefox when clicking on the "Download File" link on this page: https://www.webtoolkit.eu/widgets/media/resources.

I searched the firefox bug tracker for "websocket disconnect" and found two reports, but neither seemed relevant.

In any case, I suspect the issue may be with Firefox rather than Wt, and Wt seems to recover fine. This is just a note for anyone who encounters the issue (and possibly has more information to share).