-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure BLPOP/BRPOP returns nil instead of raising ReadTimeoutError
In redis/redis-rb#1279, we discovered that `redis-rb` properly returned `nil` when `timeout` was reached with no key present, but when connecting to Redis Sentinels, the client raised a `ReadTimeoutTimeout` error. This occurred because of a subtle difference in how `RedisClient` (from `redis-rb`) and `Redis::Client` (from `redis-client`) behaved. The former, which is used with standalone Redis, returned `nil` because the socket read timeout was incremented to the command timeout value (redis/redis-rb#1175). The latter did not have this, so the socket read timeout would get triggered before the actual Redis timeout hit. To make the behavior consistent, increment the configured read timeout to the command timeout. Closes redis/redis-rb#1279
- Loading branch information
Showing
2 changed files
with
33 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters