fix to have http_connection support keep-alive connections

This commit is contained in:
Arvid Norberg 2007-03-29 16:23:11 +00:00
parent fc46a731eb
commit 6c8ef08e56
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ void http_connection::start(std::string const& hostname, std::string const& port
m_timeout = timeout;
m_timer.expires_from_now(m_timeout);
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();
asio::async_write(m_sock, asio::buffer(sendbuffer)