Skip to content

Commit 01743e2

Browse files
committed
Merge pull request #431 from eakraly/0.11-devel
Conditional async_client liftetime_thread creation and fix for URI swap bug.
2 parents 8d7972b + addf968 commit 01743e2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ struct async_client
5757
always_verify_peer_(always_verify_peer) {
5858
connection_base::resolver_strand_.reset(
5959
new boost::asio::io_service::strand(service_));
60-
lifetime_thread_.reset(new boost::thread(
61-
boost::bind(&boost::asio::io_service::run, &service_)));
60+
if(!service)
61+
lifetime_thread_.reset(new boost::thread(
62+
boost::bind(&boost::asio::io_service::run, &service_)));
6263
}
6364

6465
~async_client() throw() {

boost/network/uri/uri.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class BOOST_URI_DECL uri {
8787

8888
void swap(uri &other) {
8989
boost::swap(uri_, other.uri_);
90-
boost::swap(uri_parts_, other.uri_parts_);
90+
other.parse();
9191
boost::swap(is_valid_, other.is_valid_);
9292
}
9393

0 commit comments

Comments
 (0)