Skip to content

Commit af17c77

Browse files
committed
Avoid self join
1 parent 6af46f5 commit af17c77

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

boost/network/protocol/http/client/async_impl.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ namespace boost { namespace network { namespace http {
7777
{
7878
sentinel_.reset();
7979
if (lifetime_thread_.get()) {
80-
lifetime_thread_->join();
80+
if (lifetime_thread_->get_id() != boost::this_thread::get_id()) {
81+
lifetime_thread_->join();
82+
}
8183
lifetime_thread_.reset();
8284
}
8385
delete service_ptr;

0 commit comments

Comments
 (0)