Skip to content

Commit 0617a7b

Browse files
committed
refactor: by rector
1 parent 7707ddf commit 0617a7b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

system/Session/Handlers/RedisHandler.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,8 @@ public function close(): bool
230230
$pingReply = $this->redis->ping();
231231

232232
if (($pingReply === true) || ($pingReply === '+PONG')) {
233-
if (isset($this->lockKey)) {
234-
if (! $this->releaseLock()) {
235-
return false;
236-
}
233+
if (isset($this->lockKey) && ! $this->releaseLock()) {
234+
return false;
237235
}
238236

239237
if (! $this->redis->close()) {

0 commit comments

Comments
 (0)