Skip to content

Commit 1b11ec6

Browse files
committed
Avoid self join
1 parent ef60d4a commit 1b11ec6

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
@@ -64,7 +64,9 @@ struct async_client
6464
~async_client() throw() {
6565
sentinel_.reset();
6666
if (lifetime_thread_.get()) {
67-
lifetime_thread_->join();
67+
if (lifetime_thread_->get_id() != boost::this_thread::get_id()) {
68+
lifetime_thread_->join();
69+
}
6870
lifetime_thread_.reset();
6971
}
7072
}

0 commit comments

Comments
 (0)