summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhaozhao.zz <zhaozhao.zz@alibaba-inc.com>2018-08-14 13:55:30 +0800
committerantirez <antirez@gmail.com>2018-08-29 12:28:25 +0200
commit2c7972cec8eae06cab10d223406bfa57e3845084 (patch)
treefe0ff42e535483eed699323fd19448ae494b2aa7
parent1203a04f5e6b7fe78162080e3ebf32ee71329785 (diff)
downloadredis-2c7972cec8eae06cab10d223406bfa57e3845084.tar.gz
networking: just return C_OK if multibulk processing saw a <= 0 length.
-rw-r--r--src/networking.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/networking.c b/src/networking.c
index 945fdd961..9e1a3a9ef 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -1252,11 +1252,8 @@ int processMultibulkBuffer(client *c) {
}
c->qb_pos = (newline-c->querybuf)+2;
- if (ll <= 0) {
- sdsrange(c->querybuf,c->qb_pos,-1);
- c->qb_pos = 0;
- return C_OK;
- }
+
+ if (ll <= 0) return C_OK;
c->multibulklen = ll;