This worked fine until we upgrade to redis version 5 and our patch wasn't being applied anymore. We recently have been seeing: SSL_write: shutdown while in init (notice that it's write instead of read). I realized that the redis-client code was rescuing SSL errors for the read: https://github.com/redis-rb/redis-client/blob/master/lib/redis_client/ruby_connection.rb#L102
But it wasn't doing it for write. This PR adds rescuing of OpenSSL::SSL::SSLError to write and write_multi.
While on version 4 of the
redis
gem, we had a monkey patch to rescueSSL_read: shutdown while in init
errors as suggested here: https://github.com/redis/redis-rb/issues/1174#issuecomment-1412993295This worked fine until we upgrade to
redis
version 5 and our patch wasn't being applied anymore. We recently have been seeing:SSL_write: shutdown while in init
(notice that it'swrite
instead ofread
). I realized that the redis-client code was rescuing SSL errors for theread
: https://github.com/redis-rb/redis-client/blob/master/lib/redis_client/ruby_connection.rb#L102But it wasn't doing it for
write
. This PR adds rescuing ofOpenSSL::SSL::SSLError
towrite
andwrite_multi
.