mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 16:34:13 +00:00
delete HTTP connection if closed
This commit is contained in:
parent
375fceb530
commit
3344e8f824
@ -544,8 +544,8 @@ namespace util
|
|||||||
m_Stream->Send ((uint8_t *)m_Buffer, bytes_transferred);
|
m_Stream->Send ((uint8_t *)m_Buffer, bytes_transferred);
|
||||||
Receive ();
|
Receive ();
|
||||||
}
|
}
|
||||||
/*else if (ecode != boost::asio::error::operation_aborted)
|
else if (ecode != boost::asio::error::operation_aborted)
|
||||||
Terminate ();*/
|
Terminate ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HTTPConnection::RunRequest ()
|
void HTTPConnection::RunRequest ()
|
||||||
@ -600,13 +600,17 @@ namespace util
|
|||||||
|
|
||||||
void HTTPConnection::HandleWriteReply (const boost::system::error_code& ecode)
|
void HTTPConnection::HandleWriteReply (const boost::system::error_code& ecode)
|
||||||
{
|
{
|
||||||
Terminate ();
|
if (ecode != boost::asio::error::operation_aborted)
|
||||||
|
Terminate ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HTTPConnection::HandleWrite (const boost::system::error_code& ecode)
|
void HTTPConnection::HandleWrite (const boost::system::error_code& ecode)
|
||||||
{
|
{
|
||||||
if (ecode || (m_Stream && !m_Stream->IsOpen ()))
|
if (ecode || (m_Stream && !m_Stream->IsOpen ()))
|
||||||
Terminate ();
|
{
|
||||||
|
if (ecode != boost::asio::error::operation_aborted)
|
||||||
|
Terminate ();
|
||||||
|
}
|
||||||
else // data keeps coming
|
else // data keeps coming
|
||||||
AsyncStreamReceive ();
|
AsyncStreamReceive ();
|
||||||
}
|
}
|
||||||
@ -883,7 +887,7 @@ namespace util
|
|||||||
{
|
{
|
||||||
if (ecode == boost::asio::error::timed_out)
|
if (ecode == boost::asio::error::timed_out)
|
||||||
SendReply ("<html>" + itoopieImage + "<br>Not responding</html>", 504);
|
SendReply ("<html>" + itoopieImage + "<br>Not responding</html>", 504);
|
||||||
else
|
else if (ecode != boost::asio::error::operation_aborted)
|
||||||
Terminate ();
|
Terminate ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user