Skip to content

Commit 9dd96fe

Browse files
committed
Rescue from all connection-related errors when trying to reconnect (also includes TimeoutError and CannotConnectError).
1 parent b1a619d commit 9dd96fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/redis/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def ensure_connected
327327
end
328328

329329
yield
330-
rescue ConnectionError, InheritedError
330+
rescue BaseConnectionError
331331
disconnect
332332

333333
if attempts <= @options[:reconnect_attempts] && @reconnect

0 commit comments

Comments
 (0)