mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
proxy client: cancel resolver on stop
This commit is contained in:
1 parent
a37e42af37
commit
903eba6a31
1 file changed
+3
-1
@@ -190,10 +190,12 @@ void
|
||||
DhtProxyClient::stop()
|
||||
{
|
||||
if (not isDestroying_.exchange(true)) {
|
||||
std::shared_ptr<http::Resolver> resolver;
|
||||
{
|
||||
std::lock_guard<std::mutex> l(resolverLock_);
|
||||
resolver_.reset();
|
||||
resolver = std::move(resolver_);
|
||||
}
|
||||
resolver->cancel();
|
||||
cancelAllListeners();
|
||||
if (infoState_)
|
||||
infoState_->cancel = true;
|
||||
|
||||
Reference in new issue
Block a user