summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_cache.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-02-19 10:24:09 +0100
committerAleksander Machniak <alec@alec.pl>2015-02-19 10:24:09 +0100
commit81d4ff214e7cf2253c270a8f8de533bebbf88c15 (patch)
tree0590c1e8c13d6dbad1b4cc470f071e29b722ae64 /program/lib/Roundcube/rcube_cache.php
parent2e28a74ce9d705b342d70e3148b9b4aa2c09d837 (diff)
Fix setting max packet size for DB caches and check packet size also in shared cache
Diffstat (limited to 'program/lib/Roundcube/rcube_cache.php')
-rw-r--r--program/lib/Roundcube/rcube_cache.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/lib/Roundcube/rcube_cache.php b/program/lib/Roundcube/rcube_cache.php
index 7210ce645..52a2db997 100644
--- a/program/lib/Roundcube/rcube_cache.php
+++ b/program/lib/Roundcube/rcube_cache.php
@@ -605,8 +605,8 @@ class rcube_cache
$this->max_packet = 2097152; // default/max is 2 MB
if ($this->type == 'db') {
- $value = $this->db->get_variable('max_allowed_packet', 1048500);
- $this->max_packet = min($value, $this->max_packet) - 2000;
+ $value = $this->db->get_variable('max_allowed_packet', $this->max_packet);
+ $this->max_packet = max($value, $this->max_packet) - 2000;
}
else if ($this->type == 'memcache') {
$stats = $this->db->getStats();