diff options
author | Roey Prat <roey.prat@redislabs.com> | 2018-10-02 11:15:30 +0300 |
---|---|---|
committer | Roey Prat <roey.prat@redislabs.com> | 2018-10-28 12:12:53 +0200 |
commit | 644de16c16bfef7ce80dde1d2d718d91a6eae308 (patch) | |
tree | 48ec7460e3b77e68e0b05c4307e2f9bb9cba4023 /redis/client.py | |
parent | 832c296f73bcdcf51b420bb3683ff62d1b43767b (diff) | |
download | redis-py-644de16c16bfef7ce80dde1d2d718d91a6eae308.tar.gz |
xread: block parameter may be set to zero, to block indefinitely
Diffstat (limited to 'redis/client.py')
-rwxr-xr-x | redis/client.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py index 95dc63f..570d94d 100755 --- a/redis/client.py +++ b/redis/client.py @@ -1788,8 +1788,8 @@ class StrictRedis(object): """ pieces = [] if block is not None: - if not isinstance(block, int) or block < 1: - raise RedisError("XREAD block must be a positive integer") + if not isinstance(block, int) or block < 0: + raise RedisError("XREAD block must be a non-negative integer") pieces.append("BLOCK") pieces.append(str(block)) if count is not None: |