Trying to fix dead listeners with connection options

This commit is contained in:
Kasper Rynning-Tønnesen
2015-06-29 17:37:17 +02:00
parent 62b74bdaee
commit 7bbf09e697
3 changed files with 29 additions and 27 deletions

View File

@@ -36,7 +36,12 @@ var lastSample = Date.now();
var began = false;
var id;
var socket = io.connect('//'+window.location.hostname+':3000');
var connection_options = {
'sync disconnect on unload':true,
transports: ['websocket', 'xhr-polling', 'polling', 'htmlfile', 'flashsocket']
};
var socket = io.connect('//'+window.location.hostname+':3000', connection_options);
socket.on("get_list", function(){
socket.emit('list', chan.toLowerCase());
});