diff --git a/client_http.hpp b/client_http.hpp index 40caf75..d8c9c60 100644 --- a/client_http.hpp +++ b/client_http.hpp @@ -135,6 +135,8 @@ namespace SimpleWeb { if(content_length>0) write_stream << content.rdbuf(); + connect(); + auto timer=get_timeout_timer(); boost::asio::async_write(*socket, write_buffer, [this, timer](const boost::system::error_code &ec, size_t /*bytes_transferred*/) {