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) { ...@@ -124,6 +124,7 @@ int ConsumeTask(RedisConnContext* ctx, RedisTask* task, butil::IOBuf* sendbuf) {
if (!ParseArgs(task->input_message, &args)) { if (!ParseArgs(task->input_message, &args)) {
LOG(ERROR) << "ERR command not string"; LOG(ERROR) << "ERR command not string";
output.SetError("ERR command not string"); output.SetError("ERR command not string");
output.SerializeToIOBuf(sendbuf);
return -1; return -1;
} }
if (ctx->handler_continue) { if (ctx->handler_continue) {
...@@ -172,10 +173,7 @@ int Consume(void* ctx, bthread::TaskIterator<RedisTask*>& iter) { ...@@ -172,10 +173,7 @@ int Consume(void* ctx, bthread::TaskIterator<RedisTask*>& iter) {
if (has_err) { if (has_err) {
continue; continue;
} }
if (ConsumeTask(qctx, *iter, &sendbuf) != 0) { ConsumeTask(qctx, *iter, &sendbuf);
has_err = true;
continue;
}
// If there are too many tasks to execute, latency of the front // If there are too many tasks to execute, latency of the front
// responses will be increased by waiting the following tasks to // responses will be increased by waiting the following tasks to
// be completed. To prevent this, if the current buf size is greater // 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