Skip to content

Commit 7f15c89

Browse files
author
Valtteri Heikkila
committed
Minor fix in http_linux.cpp
1 parent 93d7e97 commit 7f15c89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Release/src/http/client/http_linux.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,6 @@ namespace web { namespace http
329329
request_stream << "Connection: Keep-Alive" << CRLF;
330330
request_stream << CRLF;
331331

332-
tcp::resolver::query query(host, utility::conversions::print_string(port));
333-
334332
ctx->set_timer(static_cast<int>(client_config().timeout().count()));
335333

336334
if (ctx->m_connection->m_socket.is_open())
@@ -339,6 +337,8 @@ namespace web { namespace http
339337
}
340338
else
341339
{
340+
tcp::resolver::query query(host, utility::conversions::print_string(port));
341+
342342
m_resolver.async_resolve(query, boost::bind(&linux_client::handle_resolve, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::iterator, ctx));
343343
}
344344
}

0 commit comments

Comments
 (0)