Streams: XREAD ability to block fixed.

This commit is contained in:
antirez
2017-09-08 12:25:06 +02:00
parent 6a1c92d52d
commit 0adb43b68f
2 changed files with 4 additions and 5 deletions

View File

@ -412,9 +412,8 @@ void xreadCommand(client *c) {
char *o = c->argv[i]->ptr;
if (!strcasecmp(o,"BLOCK") && moreargs) {
i++;
if (getLongLongFromObjectOrReply(c,c->argv[i],&timeout,NULL)
!= C_OK) return;
if (timeout < 0) timeout = 0;
if (getTimeoutFromObjectOrReply(c,c->argv[i],&timeout,
UNIT_MILLISECONDS) != C_OK) return;
} else if (!strcasecmp(o,"COUNT") && moreargs) {
i++;
if (getLongLongFromObjectOrReply(c,c->argv[i],&count,NULL) != C_OK)