Skip to content

Commit

Permalink
Update AbstractRedisConnection.php (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzhhui authored Jun 27, 2018
1 parent 2425d46 commit 0ecd931
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/redis/src/AbstractRedisConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ public function reconnect()
public function check(): bool
{
try {
$this->connection->ping();
if (false === $this->connection->ping()) {
throw new \RuntimeException('Connection lost');
}
$connected = true;
} catch (\Throwable $throwable) {
$connected = false;
Expand Down

0 comments on commit 0ecd931

Please sign in to comment.