Skip to content

Commit 53540ce

Browse files
committed
fix: read correct config property names in RedisHandler lockSession
1 parent 5d86419 commit 53540ce

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

system/Session/Handlers/RedisHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ public function __construct(SessionConfig $config, string $ipAddress)
9898
$this->keyPrefix .= $this->ipAddress . ':';
9999
}
100100

101-
$this->lockRetryInterval = $config->lockWait ?? $this->lockRetryInterval;
102-
$this->lockMaxRetries = $config->lockAttempts ?? $this->lockMaxRetries;
101+
$this->lockRetryInterval = $config->lockRetryInterval;
102+
$this->lockMaxRetries = $config->lockMaxRetries;
103103
}
104104

105105
protected function setSavePath(): void

tests/system/Session/Handlers/Database/RedisHandlerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ public function testResetPersistentConnections(): void
363363
public function testLockMaxRetries(): void
364364
{
365365
$options = [
366-
'lockWait' => 10_000, // 10ms
367-
'lockAttempts' => 3,
366+
'lockRetryInterval' => 10_000, // 10ms
367+
'lockMaxRetries' => 3,
368368
];
369369

370370
$handler1 = $this->getInstance($options);

0 commit comments

Comments
 (0)