From e7be91ef14d31279e403f9193a935dc928e536a8 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Wed, 23 Nov 2016 13:43:00 +0100 Subject: [PATCH] Fixes #87: now connects to socket when using second Client::request method --- client_http.hpp | 2 ++ 1 file changed, 2 insertions(+) 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*/) {