Reputation: 79299
How do I make socket.io client (latest version 1.1.0) not to reconnect to server in case of disconnect? I tried finding it in manual but it's not obvious.
Upvotes: 0
Views: 184
Reputation: 707158
Ahh, it looks like there's a simple solution to avoid reconnect logic. When you connect from the client, it is usually with something like this:
var socket = io(url);
Just add an options object afterwards like this:
var socket = io(url, {reconnection: false});
It's documented here: http://socket.io/docs/client-api/
Upvotes: 3