Merge pull request #136 from zzpuser/patch-3

修正了Memcached关闭时调用的方法。
This commit is contained in:
ThinkPHP
2016-06-18 09:36:33 +08:00
committed by GitHub

View File

@@ -64,7 +64,7 @@ class Memcached extends SessionHandler
if('' != $this->config['username']){ if('' != $this->config['username']){
$this->handler->setOption(\Memcached::OPT_BINARY_PROTOCOL, true); $this->handler->setOption(\Memcached::OPT_BINARY_PROTOCOL, true);
$this->handler->setSaslAuthData($this->config['username'], $this->config['password']); $this->handler->setSaslAuthData($this->config['username'], $this->config['password']);
} }
return true; return true;
} }
@@ -75,7 +75,7 @@ class Memcached extends SessionHandler
public function close() public function close()
{ {
$this->gc(ini_get('session.gc_maxlifetime')); $this->gc(ini_get('session.gc_maxlifetime'));
$this->handler->close(); $this->handler->quit();
$this->handler = null; $this->handler = null;
return true; return true;
} }