Skip to content

Commit

Permalink
free transaction handler for handled unwatch
Browse files Browse the repository at this point in the history
  • Loading branch information
thweetkomputer committed Jan 22, 2024
1 parent 846f5ac commit a3a25a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/brpc/policy/redis_protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ int ConsumeCommand(RedisConnContext* ctx,
if (result == REDIS_CMD_BATCHED) {
LOG(ERROR) << "BATCHED should not be returned by a transaction handler.";
return -1;
} else if (result == REDIS_CMD_HANDLED) {
ctx->transaction_handler.reset(NULL);
ctx->in_transaction = false;
}
}
}
Expand Down

0 comments on commit a3a25a4

Please sign in to comment.