I have a basic Socket.io server setup like this:
var server = express.createServer().listen(port);
this.io = socketIO.listen(server);
this.io.sockets.on
Are you setting too low a value for closetimeout and heartbeat interval. The default values for these are 60 sec and 25 sec. Typical network lag is of the order of 5 sec. So with the values that you have set, the client does not respond in the time specified, so the connection is closed. When the client connects again, the connection event is fired.