We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c808aa commit 6e90332Copy full SHA for 6e90332
lib/redis/client.rb
@@ -82,7 +82,13 @@ def call_v(command, &block)
82
end
83
84
def blocking_call_v(timeout, command, &block)
85
- timeout += self.timeout if timeout && timeout > 0
+ if timeout && timeout > 0
86
+ # Can't use the command timeout argument as the connection timeout
87
+ # otherwise it would be very racy. So we add an extra 100ms to account for
88
+ # the network delay.
89
+ timeout += 0.1
90
+ end
91
+
92
super(timeout, command, &block)
93
rescue ::RedisClient::Error => error
94
raise ERROR_MAPPING.fetch(error.class), error.message, error.backtrace
0 commit comments