File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
boost/network/protocol/http/client Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 14
14
#include < boost/thread/thread.hpp>
15
15
#include < boost/bind.hpp>
16
16
#include < boost/network/protocol/http/client/connection_manager.hpp>
17
+ #include < boost/network/protocol/http/client/simple_connection_manager.hpp>
17
18
#include < boost/network/protocol/http/request.hpp>
18
19
19
20
namespace boost { namespace network { namespace http {
@@ -65,9 +66,14 @@ client_base::~client_base() {
65
66
client_base_pimpl::client_base_pimpl (client_options const &options)
66
67
: options_(options),
67
68
service_ptr (options.io_service()),
68
- sentinel_(new (std::nothrow) boost::asio::io_service::work(*service_ptr) ),
69
+ sentinel_(),
69
70
connection_manager_(options.connection_manager())
70
71
{
72
+ if (service_ptr == 0 ) service_ptr = new (std::nothrow) asio::io_service;
73
+ if (!connection_manager_.get ())
74
+ connection_manager_.reset (
75
+ new (std::nothrow) simple_connection_manager (options));
76
+ sentinel_.reset (new (std::nothrow) boost::asio::io_service::work (*service_ptr));
71
77
lifetime_thread_.reset (new (std::nothrow) boost::thread (
72
78
boost::bind (
73
79
&boost::asio::io_service::run,
You can’t perform that action at this time.
0 commit comments