diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-07-06 08:32:51 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-07-06 08:32:51 +0000 |
| commit | 72ee3440e23c40c53e915ca8185b4fdf47ed25c1 (patch) | |
| tree | e1b03a62925cdf31625880985b9471eace9e101f | |
| parent | 807533d1e65c17cf2b06be88a3e2809c106a31d8 (diff) | |
- Don't send keep-alive request when system is busy
git-svn-id: https://svn.roundcube.net/trunk@4912 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/js/app.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index 249c88d78..d26b0d5b4 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/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 |
