Merge ../its-meta-theme-dark
This commit is contained in:
commit
d9b4d6d17d
1 changed files with 15 additions and 3 deletions
|
@ -28,10 +28,22 @@ var its = (function() {
|
|||
url.protocol = url.protocol == 'https:' ? 'wss' : 'ws';
|
||||
url += 'its-open-ws/';
|
||||
|
||||
|
||||
var reconnect_delay = 1000;
|
||||
var reconnect_giveup = 1000000;
|
||||
|
||||
function connect() {
|
||||
if(reconnect_delay > reconnect_giveup)
|
||||
return;
|
||||
|
||||
setTimeout(function() {
|
||||
console.log('isitopen: reconnecting');
|
||||
var ws = new WebSocket(url);
|
||||
register(ws);
|
||||
|
||||
}, reconnect_delay);
|
||||
|
||||
reconnect_delay *= 2;
|
||||
}
|
||||
|
||||
function refresh() {
|
||||
|
|
Loading…
Reference in a new issue