Commit 5119438d authored by Robert Lyon's avatar Robert Lyon Committed by Cecilia Vela Gurovic
Browse files

Bug 1814316: Checking memcached version if stats not available



behatnotneeded

Change-Id: I2bc1172044a160d72905bf56a55f505ccd1250c0
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit 650fae55)
parent f8a92913
...@@ -112,7 +112,10 @@ class Session { ...@@ -112,7 +112,10 @@ class Session {
$server_stats = $memcached->getStats(); $server_stats = $memcached->getStats();
if ($server_stats[$destination . ":" . $port]['pid'] <= 0) { if ($server_stats[$destination . ":" . $port]['pid'] <= 0) {
// can't reach the destination:port // can't reach the destination:port
throw new ConfigSanityException(get_string('nomemcachedserver', 'error', $server)); $server_version = $memcached->getVersion();
if (empty($server_version[$destination . ":" . $port])) {
throw new ConfigSanityException(get_string('nomemcachedserver', 'error', $server));
}
} }
} }
else { else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment