Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/redis/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def io
e2 = TimeoutError.new("Connection timed out")
e2.set_backtrace(e1.backtrace)
raise e2
rescue Errno::ECONNRESET, Errno::EPIPE, Errno::ECONNABORTED, Errno::EBADF, Errno::EINVAL => e
rescue Errno::ECONNRESET, Errno::EPIPE, Errno::ECONNABORTED, Errno::EBADF, Errno::EINVAL, EOFError => e
raise ConnectionError, "Connection lost (%s)" % [e.class.name.split("::").last]
end

Expand Down
6 changes: 6 additions & 0 deletions lib/redis/connection/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,12 @@ def read
format_reply(reply_type, line)
rescue Errno::EAGAIN
raise TimeoutError
rescue OpenSSL::SSL::SSLError => ssl_error
if ssl_error.message.match?(/SSL_read: unexpected eof while reading/i)
raise EOFError, ssl_error.message
else
raise
end
end

def format_reply(reply_type, line)
Expand Down