From 7988e707671aa82a2ab192c6a918f796312a75e3 Mon Sep 17 00:00:00 2001 From: Daniel Pepper Date: Thu, 2 Nov 2023 13:48:58 -0700 Subject: [PATCH] ErrnoETIMEDOUT --- CHANGELOG.md | 2 ++ lib/redis/client.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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)