diff options
author | antirez <antirez@gmail.com> | 2018-09-04 13:13:47 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2018-09-04 13:13:47 +0200 |
commit | 37fb606cdc46663e4bcf2794d7475d4e1c556e2d (patch) | |
tree | cfa7f372b0d99738dff6dfc1b142ba2b6e8cf907 | |
parent | 1898e6ce7fad3fb1a5a6d469c281a23d0b000c7f (diff) | |
parent | b221ca41da35d987eba9b1b5961768c6434f66b3 (diff) | |
download | redis-37fb606cdc46663e4bcf2794d7475d4e1c556e2d.tar.gz |
Merge branch '5.0' of github.com:/antirez/redis into 5.0
-rw-r--r-- | src/t_stream.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/t_stream.c b/src/t_stream.c index 77fbf4645..40e0c84b8 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -1436,7 +1436,7 @@ void xreadCommand(client *c) { * synchronously in case the group top item delivered is smaller * than what the stream has inside. */ streamID *last = &groups[i]->last_id; - if (streamCompareID(&s->last_id, last) > 0) { + if (s->length && (streamCompareID(&s->last_id, last) > 0)) { serve_synchronously = 1; *gt = *last; } @@ -1444,7 +1444,7 @@ void xreadCommand(client *c) { } else { /* For consumers without a group, we serve synchronously if we can * actually provide at least one item from the stream. */ - if (streamCompareID(&s->last_id, gt) > 0) { + if (s->length && (streamCompareID(&s->last_id, gt) > 0)) { serve_synchronously = 1; } } |