bring back retry on connection fail
This commit is contained in:
parent
afacc413e1
commit
453b185c85
1 changed files with 8 additions and 5 deletions
|
@ -5,9 +5,9 @@
|
||||||
// Maximum update frequency is controlled by #{startdelay}
|
// Maximum update frequency is controlled by #{startdelay}
|
||||||
// and #{delay}, both in milliseconds.
|
// and #{delay}, both in milliseconds.
|
||||||
|
|
||||||
$connfails = 0;
|
connfails=0;
|
||||||
|
|
||||||
$connfailed =
|
connfailed=
|
||||||
'<div id="modal" class="modal fade">' +
|
'<div id="modal" class="modal fade">' +
|
||||||
' <div .modal-header>' +
|
' <div .modal-header>' +
|
||||||
' <h3>git-annex has shut down</h2>' +
|
' <h3>git-annex has shut down</h2>' +
|
||||||
|
@ -31,13 +31,16 @@ $.LongPoll#{ident} = (function() {
|
||||||
numerrs=0;
|
numerrs=0;
|
||||||
},
|
},
|
||||||
'error': function(jqxhr, msg, e) {
|
'error': function(jqxhr, msg, e) {
|
||||||
$connfails = $confails + 1;
|
connfails=connfails+1;
|
||||||
if (! $connfails > 3) {
|
if (connfails > 3) {
|
||||||
// blocked by many browsers
|
// blocked by many browsers
|
||||||
window.close();
|
window.close();
|
||||||
$('#modal').replaceWith($connfailed);
|
$('#modal').replaceWith(connfailed);
|
||||||
$('#modal').modal('show');
|
$('#modal').modal('show');
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
setTimeout($.LongPoll#{ident}.send, #{show delay});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue