Open
Description
In PHP 7, session_start()
can take an $options
array parameter (php doc)
Using this parameter with Cm_RedisSession
will cause the read()
function to increment the lock
field of the redis hash structure, then close()
will be immediately called.
Unfortunately, close()
does not decrement the lock
field, which means that any subsequent call to read()
will wait until the configured timeout before taking the lock on the session.
/**
* Overridden to prevent calling getLifeTime at shutdown
*
* @return bool
*/
public function close()
{
$this->_log("Closing connection");
if ($this->_redis) $this->_redis->close();
return true;
}
Submitted PR #17, however, I'm not convinced this is the right way of handling this issue.
It might make more sense to add logic to read()
to release the lock when being used with "read_and_close".
Metadata
Metadata
Assignees
Labels
No labels