Skip to content

Commit ce53598

Browse files
committed
Merge pull request cpp-netlib#402 from leecoder/0.11-devel
Fixes cpp-netlib#358 - avoid self join
2 parents 8c4a9da + 9bd4e4f commit ce53598

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)