Commit ad00e356 authored by zhujiashun's avatar zhujiashun

redis_server_protocol: fix sendbuf not setting bug

parent 684f4ed1
......@@ -124,6 +124,7 @@ int ConsumeTask(RedisConnContext* ctx, RedisTask* task, butil::IOBuf* sendbuf) {
if (!ParseArgs(task->input_message, &args)) {
LOG(ERROR) << "ERR command not string";
output.SetError("ERR command not string");
output.SerializeToIOBuf(sendbuf);
return -1;
}
if (ctx->handler_continue) {
......@@ -172,10 +173,7 @@ int Consume(void* ctx, bthread::TaskIterator<RedisTask*>& iter) {
if (has_err) {
continue;
}
if (ConsumeTask(qctx, *iter, &sendbuf) != 0) {
has_err = true;
continue;
}
ConsumeTask(qctx, *iter, &sendbuf);
// If there are too many tasks to execute, latency of the front
// responses will be increased by waiting the following tasks to
// be completed. To prevent this, if the current buf size is greater
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment