mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
new parsing code bugfixing
This commit is contained in:
parent
34a719d250
commit
a4f3f93b90
@ -664,6 +664,8 @@ void closeTimedoutClients(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void processInputBuffer(redisClient *c) {
|
void processInputBuffer(redisClient *c) {
|
||||||
|
int seeknewline = 0;
|
||||||
|
|
||||||
again:
|
again:
|
||||||
/* Before to process the input buffer, make sure the client is not
|
/* Before to process the input buffer, make sure the client is not
|
||||||
* waitig for a blocking operation such as BLPOP. Note that the first
|
* waitig for a blocking operation such as BLPOP. Note that the first
|
||||||
@ -672,6 +674,9 @@ again:
|
|||||||
* in the input buffer the client may be blocked, and the "goto again"
|
* in the input buffer the client may be blocked, and the "goto again"
|
||||||
* will try to reiterate. The following line will make it return asap. */
|
* will try to reiterate. The following line will make it return asap. */
|
||||||
if (c->flags & REDIS_BLOCKED || c->flags & REDIS_IO_WAIT) return;
|
if (c->flags & REDIS_BLOCKED || c->flags & REDIS_IO_WAIT) return;
|
||||||
|
|
||||||
|
if (seeknewline && c->bulklen == -1) c->newline = strchr(c->querybuf,'\n');
|
||||||
|
seeknewline = 1;
|
||||||
if (c->bulklen == -1) {
|
if (c->bulklen == -1) {
|
||||||
/* Read the first line of the query */
|
/* Read the first line of the query */
|
||||||
size_t querylen;
|
size_t querylen;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user