mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
throw connection_reset error is stream is closed
This commit is contained in:
parent
45289891d6
commit
207022a6bb
@ -416,9 +416,9 @@ namespace util
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_Stream && m_Stream->IsOpen ())
|
||||
if (ecode == boost::asio::error::timed_out)
|
||||
SendReply ("<html>" + itoopieImage + "<br>Not responding</html>", 504);
|
||||
else
|
||||
else
|
||||
Terminate ();
|
||||
}
|
||||
}
|
||||
|
@ -213,6 +213,11 @@ namespace stream
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!m_IsOpen)
|
||||
{
|
||||
handler (boost::asio::error::make_error_code (boost::asio::error::connection_reset), 0);
|
||||
return;
|
||||
}
|
||||
m_ReceiveTimer.expires_from_now (boost::posix_time::seconds(timeout));
|
||||
m_ReceiveTimer.async_wait ([=](const boost::system::error_code& ecode)
|
||||
{ this->HandleReceiveTimer (ecode, buffer, handler); });
|
||||
|
Loading…
Reference in New Issue
Block a user