Skip to content

Commit

Permalink
Fix ensure connection to memcached
Browse files Browse the repository at this point in the history
  • Loading branch information
ackintosh committed Apr 18, 2017
1 parent e420d5a commit 3bf4053
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Ganesha/Storage/Adapter/Memcached.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ public function loadStatus($serviceName)

public function reset()
{
if (!$this->memcached->getStats()) {
throw new \RuntimeException('Couldn\'t connect to memcached.');
}

// getAllKeys() with OPT_BINARY_PROTOCOL is not suppoted.
// So temporarily disable it.
$this->memcached->setOption(\Memcached::OPT_BINARY_PROTOCOL, false);
Expand Down

0 comments on commit 3bf4053

Please sign in to comment.