aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-30 16:24:55 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-30 16:24:55 -0400
commit453b185c8506e4a6a030788f42eec196386ac78e (patch)
tree31953a025af290480857d03afd309ae82b54c9c7 /templates
parentafacc413e1643a93a71e93cba3f4e1e470fc4581 (diff)
bring back retry on connection fail
Diffstat (limited to 'templates')
-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});
+ }
},
});
}