8000 [Bugfix] MemcachedSessionHandler::close() must close connection · symfony/symfony@b77e76a · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b77e76a

Browse files
committed
[Bugfix] MemcachedSessionHandler::close() must close connection
1 parent 7f04e55 commit b77e76a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Symfony/Component/HttpFoundation/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
/**

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ protected function setUp()
4343
}
4444

4545
$this->memcached = $this->getMockBuilder('Memcached')->getMock();
46+
$this->memcached->method('quit')->willReturn(true);
4647
$this->storage = new MemcachedSessionHandler(
4748
$this->memcached,
4849
array('prefix' => self::PREFIX, 'expiretime' => self::TTL)

0 commit comments

Comments
 (0)
0