diff options
author | zhaozhao.zz <zhaozhao.zz@alibaba-inc.com> | 2018-08-14 14:50:37 +0800 |
---|---|---|
committer | zhaozhao.zz <zhaozhao.zz@alibaba-inc.com> | 2018-08-14 14:50:37 +0800 |
commit | ef2a95c46125a5e5402a2ee1e433f78959596d0c (patch) | |
tree | 195036669298c93f27746be8cb9670730b6ef8d3 | |
parent | e623bd22bab45d8ce20d82bb2de5e8ed82f9e7bf (diff) | |
download | redis-ef2a95c46125a5e5402a2ee1e433f78959596d0c.tar.gz |
networking: just move qb_pos instead of sdsrange in processInlineBuffer
-rw-r--r-- | src/networking.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/networking.c b/src/networking.c index 9e1a3a9ef..24432339b 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1152,9 +1152,8 @@ int processInlineBuffer(client *c) { if (querylen == 0 && c->flags & CLIENT_SLAVE) c->repl_ack_time = server.unixtime; - /* Leave data after the first line of the query in the buffer */ - sdsrange(c->querybuf,c->qb_pos+querylen+linefeed_chars,-1); - c->qb_pos = 0; + /* Move querybuffer position to the next query in the buffer. */ + c->qb_pos += querylen+linefeed_chars; /* Setup argv array on client structure */ if (argc) { |