diff options
author | 2012-07-30 16:14:27 -0400 | |
---|---|---|
committer | 2012-07-30 16:14:27 -0400 | |
commit | afacc413e1643a93a71e93cba3f4e1e470fc4581 (patch) | |
tree | 13ea5c0a7f5187b7930faf1c133ac7522ac3d24d | |
parent | 2400c6faa34bc696c30253edb219a5ffad0b2a36 (diff) |
bring back connection failure counter
Otherwise, navigating between pages can, I guess, cause connection failures
that take down the webapp.
-rw-r--r-- | templates/longpolling.julius | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/longpolling.julius b/templates/longpolling.julius index 0d18b8435..dd5705fc9 100644 --- a/templates/longpolling.julius +++ b/templates/longpolling.julius @@ -5,7 +5,7 @@ // Maximum update frequency is controlled by #{startdelay} // and #{delay}, both in milliseconds. -$dead = 0; +$connfails = 0; $connfailed = '<div id="modal" class="modal fade">' + @@ -31,8 +31,8 @@ $.LongPoll#{ident} = (function() { numerrs=0; }, 'error': function(jqxhr, msg, e) { - if (! $dead) { - $dead=1; + $connfails = $confails + 1; + if (! $connfails > 3) { // blocked by many browsers window.close(); $('#modal').replaceWith($connfailed); |