Skip to content

Commit 84087cd

Browse files
authored
Merge pull request #180 from ngan/retry-write-on-ssl-errors
Rescue OpenSSL::SSL::SSLError for write and write_multi
2 parents 696ff0b + 3759fc9 commit 84087cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/redis_client/ruby_connection.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def write(command)
7474
buffer = RESP3.dump(command)
7575
begin
7676
@io.write(buffer)
77-
rescue SystemCallError, IOError => error
77+
rescue SystemCallError, IOError, OpenSSL::SSL::SSLError => error
7878
raise ConnectionError.with_config(error.message, config)
7979
end
8080
end
@@ -86,7 +86,7 @@ def write_multi(commands)
8686
end
8787
begin
8888
@io.write(buffer)
89-
rescue SystemCallError, IOError => error
89+
rescue SystemCallError, IOError, OpenSSL::SSL::SSLError => error
9090
raise ConnectionError.with_config(error.message, config)
9191
end
9292
end

0 commit comments

Comments
 (0)