I use redis gem 4.8.1 in my application, so I found this problem.
After block is called in Redis::Client#with_socket_timeout, conneciton.timeout can't be restored correctly in 4.x implementation, I guess. Because self.timeout returns @options[:read_timeout] restored after connection.timeout. This causes the bug that with_socket_timeout uses wrong timeout value unexpectedly.
I can't find the tests for Redis::Client#with_socket_timeout, so I couldn't wirte one, sorry.
I use redis gem 4.8.1 in my application, so I found this problem.
After block is called in
Redis::Client#with_socket_timeout
,conneciton.timeout
can't be restored correctly in 4.x implementation, I guess. Becauseself.timeout
returns@options[:read_timeout]
restored afterconnection.timeout
. This causes the bug thatwith_socket_timeout
uses wrong timeout value unexpectedly.I can't find the tests for
Redis::Client#with_socket_timeout
, so I couldn't wirte one, sorry.