修正了Memcached关闭时调用的方法。

Memcached在关闭时与Memcache调用的方法不同,应该使用quit方法进行关闭所有连接的操作。此前使用错了关闭方法,导致在操作session的时候服务器返回500错误。

详见:http://php.net/manual/en/memcached.quit.php
This commit is contained in:
zzpuser
2016-06-17 17:14:35 +08:00
committed by GitHub
parent fddcbac7ae
commit c268cd9065

View File

@@ -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;
} }