Client::resolver is no longer a member variable
This commit is contained in:
parent
a0cd7520ba
commit
944c7fe370
2 changed files with 6 additions and 4 deletions
|
|
@ -50,7 +50,8 @@ namespace SimpleWeb {
|
|||
auto proxy_host_port=parse_host_port(config.proxy_server, 8080);
|
||||
query=std::unique_ptr<asio::ip::tcp::resolver::query>(new asio::ip::tcp::resolver::query(proxy_host_port.first, std::to_string(proxy_host_port.second)));
|
||||
}
|
||||
resolver.async_resolve(*query, [this] (const error_code &ec, asio::ip::tcp::resolver::iterator it){
|
||||
auto resolver=std::make_shared<asio::ip::tcp::resolver>(*io_service);
|
||||
resolver->async_resolve(*query, [this, resolver] (const error_code &ec, asio::ip::tcp::resolver::iterator it){
|
||||
if(!ec) {
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(socket_mutex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue