summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-10-26 17:06:23 +0000
committeralecpl <alec@alec.pl>2008-10-26 17:06:23 +0000
commit95d90f86d9c5482b531092776181943c9bf57642 (patch)
tree53fce503e46e85f1a3e6c96b97f771bf86ea34f1 /program/include
parent7ce1931bbbb740edf2e95a5eaa64959b0be07269 (diff)
- Added 'keep_alive' and 'min_keep_alive' options (#1485360)
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcmail.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 53b4765b9..7eade3223 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -289,6 +289,14 @@ class rcmail
foreach (array('flag_for_deletion','read_when_deleted') as $js_config_var) {
$this->output->set_env($js_config_var, $this->config->get($js_config_var));
}
+
+ // set keep-alive/check-recent interval
+ if ($keep_alive = $this->config->get('keep_alive')) {
+ // be sure that it's less than session lifetime
+ if ($session_lifetime = $this->config->get('session_lifetime'))
+ $keep_alive = min($keep_alive, $session_lifetime * 60 - 30);
+ $this->output->set_env('keep_alive', max(60, $keep_alive));
+ }
if ($framed) {
$this->comm_path .= '&_framed=1';