summaryrefslogtreecommitdiff
path: root/redis/commands/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'redis/commands/core.py')
-rw-r--r--redis/commands/core.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/redis/commands/core.py b/redis/commands/core.py
index 1a4acb2..f2d7bf2 100644
--- a/redis/commands/core.py
+++ b/redis/commands/core.py
@@ -3496,8 +3496,8 @@ class StreamCommands(CommandsProtocol):
raise DataError("Only one of ```maxlen``` or ```minid``` may be specified")
if maxlen is not None:
- if not isinstance(maxlen, int) or maxlen < 1:
- raise DataError("XADD maxlen must be a positive integer")
+ if not isinstance(maxlen, int) or maxlen < 0:
+ raise DataError("XADD maxlen must be non-negative integer")
pieces.append(b"MAXLEN")
if approximate:
pieces.append(b"~")