Skip to content

Commit

Permalink
ErrnoETIMEDOUT
Browse files Browse the repository at this point in the history
  • Loading branch information
dpep committed Nov 2, 2023
1 parent d0d7355 commit 7988e70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion lib/redis/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7988e70

Please sign in to comment.