diff --git a/CHANGELOG.md b/CHANGELOG.md index 0299f9eb5..07aaadd9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased +* wrap Errno::ETIMEDOUT with TimeoutError for connection io + # 4.8.0 * Introduce `sadd?` and `srem?` as boolean returning versions of `sadd` and `srem`. diff --git a/lib/redis/client.rb b/lib/redis/client.rb index 3e620faa9..91d567311 100644 --- a/lib/redis/client.rb +++ b/lib/redis/client.rb @@ -297,7 +297,7 @@ def reconnect def io yield - rescue TimeoutError => e1 + rescue TimeoutError, Errno::ETIMEDOUT => e1 # Add a message to the exception without destroying the original stack e2 = TimeoutError.new("Connection timed out") e2.set_backtrace(e1.backtrace)