mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
feature(socket) add reconnection delay, max attempts
This commit is contained in:
parent
dfe932c0b9
commit
a5ef722ea4
1 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue