diff --git a/src/brpc/policy/redis_protocol.cpp b/src/brpc/policy/redis_protocol.cpp index e8ea1fb01e..de1b5e4bcb 100644 --- a/src/brpc/policy/redis_protocol.cpp +++ b/src/brpc/policy/redis_protocol.cpp @@ -92,6 +92,7 @@ int ConsumeCommand(RedisConnContext* ctx, result = ctx->transaction_handler->Run(args, &output, flush_batched); if (result == REDIS_CMD_HANDLED) { ctx->transaction_handler.reset(NULL); + ctx->in_transaction = false; } else if (result == REDIS_CMD_BATCHED) { LOG(ERROR) << "BATCHED should not be returned by a transaction handler."; return -1;