mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(socket) reconnect_failed: mv from options to events
This commit is contained in:
parent
6a84d8330c
commit
89357e7a47
1 changed files with 5 additions and 4 deletions
|
|
@ -17,10 +17,7 @@ var CloudCmd, Util, DOM, io;
|
|||
|
||||
function connect() {
|
||||
socket = io.connect(CloudCmd.HOST, {
|
||||
'max reconnection attempts' : Math.pow(2, 32),
|
||||
'reconnect_failed' : function() {
|
||||
Util.log('Could not reconnect. Reload page.');
|
||||
}
|
||||
'max reconnection attempts' : Math.pow(2, 32)
|
||||
});
|
||||
|
||||
CloudCmd.Socket = socket;
|
||||
|
|
@ -39,6 +36,10 @@ var CloudCmd, Util, DOM, io;
|
|||
socket.on('disconnect', function () {
|
||||
outToTerminal({stderr: 'socket disconected\n'});
|
||||
});
|
||||
|
||||
socket.on('reconnect_failed', function () {
|
||||
Util.log('Could not reconnect. Reload page.');
|
||||
});
|
||||
}
|
||||
|
||||
function outToTerminal(pMsg) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue