Our mobile app communicates with our Meteor server in two ways:
- A native C# WebSockets library, and
- The regular Meteor frontend running in a web view
I tested this setup under weak network conditions (EDGE) and found out that
- the native code still connects to the server without any issues, however
- the embedded web frontend fails to establish a websocket connection
The reason for this is that SocksJS reports
WebSocket is closed before the connection is established
every two 2 seconds or so.
This timeout is way to low for unstable, bad mobile networks. I am wondering why it is has been set that low. More important: How can I change it so SockJS won’t kill the socket after such a short time?
Update: This even appears using a 3G connection setup. Not as often, but still.