summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-07-06 08:32:51 +0000
committeralecpl <alec@alec.pl>2011-07-06 08:32:51 +0000
commit93a35ccedfc53580440573ea9fc615174fac55c6 (patch)
treed8d7c470732cb14d2962437cda4c200867c95d4f /program/js/app.js
parent9220169bf1f25aab8ef82cb6bf8d830ac905f036 (diff)
- Don't send keep-alive request when system is busy
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 249c88d78..d26b0d5b4 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -5711,7 +5711,14 @@ function rcube_webmail()
if (this.env.keep_alive && !this.env.framed && this.task == 'mail' && this.gui_objects.mailboxlist)
this._int = setInterval(function(){ ref.check_for_recent(false); }, this.env.keep_alive * 1000);
else if (this.env.keep_alive && !this.env.framed && this.task != 'login' && this.env.action != 'print')
- this._int = setInterval(function(){ ref.http_request('keep-alive'); }, this.env.keep_alive * 1000);
+ this._int = setInterval(function(){ ref.keep_alive(); }, this.env.keep_alive * 1000);
+ };
+
+ // sends keep-alive signal
+ this.keep_alive = function()
+ {
+ if (!this.busy)
+ this.http_request('keep-alive');
};
// sends request to check for recent messages