Fixes #87: now connects to socket when using second Client::request method

This commit is contained in:
Mathieu Schroeter 2016-11-23 13:43:00 +01:00 • committed by eidheim
commit e7be91ef14

View file

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