Reputation: 296
I use SocketIO to communicate with a NodeJS server from an HTML5 web app. After the first connection made with SocketIO (io.connect) is done, if I open a new tab and trigger a new login for example in another module of the application, it opens a new connection with SocketIO. At soon as the second connection is successful, the first websocket connection close (I receive a "disconnect" event).
Do you know if there's something in SocketIO library that preventing a server to establish several connections with the same computer?
The behavior is the same if the first connection is made with Chrome and the second with Firefox.
But, both connections are kept alive if I use Safari.
Very strange.
Thank you!
Upvotes: 3
Views: 287
Reputation: 96
We recently experienced this problem on a OSX computer using Chrome as main browser and try to open a second websocket with Firefox. The problem was related to an invalid certificate that wasn't prior accepted as an exception for the websocket. This was causing a disconnect on the chrome browser, event if the exception was accepted and was already connected to the socket. Once firefox accepted the exception for the invalid certificate, both connections were kept. Of course, in a production environment where valid certificates are present this problem shoudn't occur.
Upvotes: 1