We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9e2042 commit 4aeba6fCopy full SHA for 4aeba6f
1 file changed
system/Session/Handlers/RedisHandler.php
@@ -266,14 +266,15 @@ public function gc($max_lifetime)
266
*/
267
protected function lockSession(string $sessionID): bool
268
{
269
+ $lockKey = $this->keyPrefix . $sessionID . ':lock';
270
+
271
// PHP 7 reuses the SessionHandler object on regeneration,
272
// so we need to check here if the lock key is for the
273
// correct session ID.
- if ($this->lockKey === $this->keyPrefix . $sessionID . ':lock') {
274
+ if ($this->lockKey === $lockKey) {
275
return $this->redis->expire($this->lockKey, 300);
276
}
277
- $lockKey = $this->keyPrefix . $sessionID . ':lock';
278
$attempt = 0;
279
280
do {
0 commit comments