aboutsummaryrefslogtreecommitdiff
path: root/templates/longpolling.julius
diff options
context:
space:
mode:
Diffstat (limited to 'templates/longpolling.julius')
-rw-r--r--templates/longpolling.julius13
1 files changed, 8 insertions, 5 deletions
diff --git a/templates/longpolling.julius b/templates/longpolling.julius
index dd5705fc9..76ff94ce3 100644
--- a/templates/longpolling.julius
+++ b/templates/longpolling.julius
@@ -5,9 +5,9 @@
// Maximum update frequency is controlled by #{startdelay}
// and #{delay}, both in milliseconds.
-$connfails = 0;
+connfails=0;
-$connfailed =
+connfailed=
'<div id="modal" class="modal fade">' +
' <div .modal-header>' +
' <h3>git-annex has shut down</h2>' +
@@ -31,13 +31,16 @@ $.LongPoll#{ident} = (function() {
numerrs=0;
},
'error': function(jqxhr, msg, e) {
- $connfails = $confails + 1;
- if (! $connfails > 3) {
+ connfails=connfails+1;
+ if (connfails > 3) {
// blocked by many browsers
window.close();
- $('#modal').replaceWith($connfailed);
+ $('#modal').replaceWith(connfailed);
$('#modal').modal('show');
}
+ else {
+ setTimeout($.LongPoll#{ident}.send, #{show delay});
+ }
},
});
}