Monday, 3 April 2017

socketio timed out on wifi

I use socket.io on node.js on an AWS EC2 for my website. I use it to push messages/notifications to users logged in to my HTTPS-only site. For the most part, this works fine.

However, a local college is using my site, and we have become aware that on their open wifi (no, they don't have a secured wifi...), socket.io gives a ERR_CONNECTION_TIMED_OUT using the default interval of 20sec. This does not happen at the same college on computers connected via Ethernet.

Chrome debug log shows type: TransportError, description: 0

The only options I have enabled are secure: true, but I turned that off and the issue persisted. I also tried different specifications for transport, and setting origins: "*", but to no avail.

The server-side code is ripped right from the socket.io chat demo, with a few slight modifications. Other "live" sites like Google Docs work fine, and even the demos on the socket.io website work there, just not my site.

Has anyone come across this issue before? I have no clue where to begin. I can talk to the college IT people as well, but I don't know what to ask them because I don't know how the network config could mess this up.

Using socket.io v1.7.3 installed via npm. The JS client library is pulled from the dist directory in the npm install dir.



via BlackBelt2025

No comments:

Post a Comment