Move resolverPtr when distorying an HttpClietImpl object (#860)

This commit is contained in:
An Tao 2021-05-20 13:15:59 +08:00 committed by GitHub
parent 32970172f6
commit 3601992546
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ HttpClientImpl::~HttpClientImpl()
if (resolverPtr_ && !(loop_->isInLoopThread()))
{
// Make sure the resolverPtr_ is destroyed in the correct thread.
loop_->queueInLoop([reolverPtr = resolverPtr_]() {});
loop_->queueInLoop([resolverPtr = std::move(resolverPtr_)]() {});
}
}