diff --git a/boost/network/protocol/http/client/async_impl.hpp b/boost/network/protocol/http/client/async_impl.hpp index 18f0e64ba..31578c2eb 100644 --- a/boost/network/protocol/http/client/async_impl.hpp +++ b/boost/network/protocol/http/client/async_impl.hpp @@ -74,7 +74,9 @@ struct async_client void wait_complete() { sentinel_.reset(); if (lifetime_thread_.get()) { - lifetime_thread_->join(); + if (lifetime_thread_->joinable() && lifetime_thread_->get_id() != std::this_thread::get_id()) { + lifetime_thread_->join(); + } lifetime_thread_.reset(); } } diff --git a/boost/network/utils/thread_group.hpp b/boost/network/utils/thread_group.hpp index 0540b6afb..d9b14439c 100644 --- a/boost/network/utils/thread_group.hpp +++ b/boost/network/utils/thread_group.hpp @@ -55,7 +55,7 @@ class thread_group { std::unique_lock guard(m); for (auto &thread : threads) { - if (thread->joinable()) { + if (thread->joinable() && thread->get_id() != std::this_thread::get_id()) { thread->join(); } } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy