Skip to content

Commit 40a7d54

Browse files
VitorTSVitor Teixeira
andauthored
reconnect when redis throws connection lost error (#46989)
Co-authored-by: Vitor Teixeira <[email protected]>
1 parent 025c912 commit 40a7d54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Redis/Connections/PhpRedisConnection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ public function command($method, array $parameters = [])
530530
try {
531531
return parent::command($method, $parameters);
532532
} catch (RedisException $e) {
533-
foreach (['went away', 'socket', 'read error on connection'] as $errorMessage) {
533+
foreach (['went away', 'socket', 'read error on connection', 'Connection lost'] as $errorMessage) {
534534
if (str_contains($e->getMessage(), $errorMessage)) {
535535
$this->client = $this->connector ? call_user_func($this->connector) : $this->client;
536536

0 commit comments

Comments
 (0)