feature(socket) add reconnection delay, max attempts

This commit is contained in:
coderaiser 2013-08-22 10:59:11 +00:00
parent 41e366db14
commit 2ae1361d71

View file

@ -17,7 +17,12 @@ var CloudCmd, Util, DOM, io;
function connect() {
socket = io.connect(CloudCmd.HOST, {
reconnect: true
'reconnect' : true,
'reconnection delay' : 500,
'max reconnection attempts' : 1000000,
'reconnect_failed' : function() {
Util.log('Could not reconnect. Reload page.');
}
});
CloudCmd.Socket = socket;