From 69b1b5be6b67c65fede8c4120962d4edb887633b Mon Sep 17 00:00:00 2001 From: Guy Benoish Date: Thu, 10 Oct 2019 09:47:48 +0200 Subject: [PATCH] Fix usage of server.stream_node_max_* --- src/t_stream.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/t_stream.c b/src/t_stream.c index d7f924cf7..ae1516423 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -245,17 +245,17 @@ int streamAppendItem(stream *s, robj **argv, int64_t numfields, streamID *added_ * the current node is full. */ if (lp != NULL) { if (server.stream_node_max_bytes && - lp_bytes > server.stream_node_max_bytes) + lp_bytes >= server.stream_node_max_bytes) { lp = NULL; } else if (server.stream_node_max_entries) { int64_t count = lpGetInteger(lpFirst(lp)); - if (count > server.stream_node_max_entries) lp = NULL; + if (count >= server.stream_node_max_entries) lp = NULL; } } int flags = STREAM_ITEM_FLAG_NONE; - if (lp == NULL || lp_bytes > server.stream_node_max_bytes) { + if (lp == NULL || lp_bytes >= server.stream_node_max_bytes) { master_id = id; streamEncodeID(rax_key,&id); /* Create the listpack having the master entry ID and fields. */ -- GitLab