forked from premiere/premiere-libtorrent
fix to have http_connection support keep-alive connections
This commit is contained in:
parent
fc46a731eb
commit
6c8ef08e56
|
@ -58,7 +58,7 @@ void http_connection::start(std::string const& hostname, std::string const& port
|
||||||
m_timeout = timeout;
|
m_timeout = timeout;
|
||||||
m_timer.expires_from_now(m_timeout);
|
m_timer.expires_from_now(m_timeout);
|
||||||
m_timer.async_wait(bind(&http_connection::on_timeout, shared_from_this(), _1));
|
m_timer.async_wait(bind(&http_connection::on_timeout, shared_from_this(), _1));
|
||||||
if (m_hostname == hostname && m_port == port)
|
if (m_sock.is_open() && m_hostname == hostname && m_port == port)
|
||||||
{
|
{
|
||||||
m_parser.reset();
|
m_parser.reset();
|
||||||
asio::async_write(m_sock, asio::buffer(sendbuffer)
|
asio::async_write(m_sock, asio::buffer(sendbuffer)
|
||||||
|
|
Loading…
Reference in New Issue