Skip to content

Commit eddd2a2

Browse files
leecoderjellevdd
authored andcommitted
Avoid self join
1 parent 246fdd2 commit eddd2a2

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)