[Libwebsockets] Connection closed on firefox but not chrome.

Andy Green andy at warmcat.com
Fri May 10 09:42:28 CEST 2019

On May 10, 2019 8:27:23 AM GMT+01:00, "Søren Holm" <sgh at sgh.dk> wrote:
>I'm running an application on top op libwebsockets 3.1 and I have run 
>into something that smells a lot like this :
>    https://bugzilla.mozilla.org/show_bug.cgi?id=1536843
>Connection lost during page load on firefox, but not chrome. Also my 
>investigations suggest that is relates to the message size. Messages < 
>32Kb goes through cleanly whereas messages larger that 32Kb drops the 
>It could look like a browser issue but the only problem is that they 
>concluded in the bug report that the bug is on the server and therefore
>did not change anything in firefox.
>Do you have any ideas?

The best way is hack the minimal server on master to show the same problem for you, and paste the hack patch and instructions so I can try it here.  If master + hack cannot be made to fail, try your stuff on master.

The bug claims the server starts sending trash... but lws has nothing in common with that server and relies on user code to tell it what to send.

ws messages > 32KB are fine, with fragmentation you can send GB messages (although js cannot receive them due to memory constraints) but outside of localhost, internet connections will quickly balk at randomly being given 32K in one lump.  So it may be another way of saying 'issue related to partial send handling' or 'user code doesn't observe sending rules'.


>Søren Holm
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org

More information about the Libwebsockets mailing list