From c4dd2bd0cddc4401ea122a21a8d28bba58030cfa Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 10 Apr 2020 10:12:26 +0200 Subject: [PATCH] RESP3: change streams items from maps to arrays. Streams items are similar to dictionaries, however they preserve both the order, and allow for duplicated field names. So a map is not a semantically sounding way to deal with this. https://twitter.com/antirez/status/1248261087553880069 --- src/t_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_stream.c b/src/t_stream.c index e0af87f97..4ce3a9b25 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -963,7 +963,7 @@ size_t streamReplyWithRange(client *c, stream *s, streamID *start, streamID *end addReplyArrayLen(c,2); addReplyStreamID(c,&id); - addReplyMapLen(c,numfields); + addReplyArrayLen(c,numfields*2); /* Emit the field-value pairs. */ while(numfields--) {