Coroutine handle should be captured by value. (#1631)

This commit is contained in:
Nitromelon 2023-06-06 22:29:48 +08:00 committed by GitHub
parent 5e245d08dc
commit 7f04e63f25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -342,7 +342,7 @@ inline void internal::RedisTransactionAwaiter::await_suspend(
{
assert(client_ != nullptr);
client_->newTransactionAsync(
[this, &handle](const std::shared_ptr<RedisTransaction> &transaction) {
[this, handle](const std::shared_ptr<RedisTransaction> &transaction) {
if (transaction == nullptr)
setException(std::make_exception_ptr(RedisException(
RedisErrorCode::kTimeout,