Commit 6d34ff36 authored by antirez's avatar antirez
Browse files

Streams: max node limits only checked if non zero.

parent 19a438e2
......@@ -241,9 +241,11 @@ int streamAppendItem(stream *s, robj **argv, int numfields, streamID *added_id,
* if we need to switch to the next one. 'lp' will be set to NULL if
* the current node is full. */
if (lp != NULL) {
if (lp_bytes > server.stream_node_max_bytes) {
if (server.stream_node_max_bytes &&
lp_bytes > server.stream_node_max_bytes)
{
lp = NULL;
} else {
} else if (server.stream_node_max_entries) {
int64_t count = lpGetInteger(lpFirst(lp));
if (count > server.stream_node_max_entries) lp = NULL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment