Skip to content

Commit

Permalink
Check if Redis old TTL is integer
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Nov 11, 2023
1 parent 2312d83 commit 8807b6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SaveHandlers/RedisHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ protected function lock(string $id) : bool
while ($attempt < $this->config['lock_attempts']) {
$attempt++;
$oldTtl = $this->redis->ttl($lockId);
if ($oldTtl > 0) {
if (\is_int($oldTtl) && $oldTtl > 0) {
\usleep($this->config['lock_sleep']);
continue;
}
Expand Down

0 comments on commit 8807b6b

Please sign in to comment.