8000 [Bugfix] MemcachedSessionHandler::close() must close connection · symfony/http-foundation@9f47e47 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9f47e47

Browse files
committed
[Bugfix] MemcachedSessionHandler::close() must close connection
1 parent 2b97319 commit 9f47e47

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Session/Storage/Handler/MemcachedSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function __construct(\Memcached $memcached, array $options = array())
6262
*/
6363
public function close()
6464
{
65-
return true;
65+
return $this->memcached->quit();
6666
}
6767

6868
/**

Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php

Lines changed: 6 additions & 0 deletions
32D7
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ public function testOpenSession()
6363

6464
public function testCloseSession()
6565
{
66+
$this->memcached
67+
->expects($this->once())
68+
->method('quit')
69+
->will($this->returnValue(true))
70+
;
71+
6672
$this->assertTrue($this->storage->close());
6773
}
6874

0 commit comments

Comments
 (0)
0