Skip to content

Commit

Permalink
don't delete HTTP connection twice
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Nov 30, 2014
1 parent fbec753 commit bd13406
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion HTTPServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,14 +514,15 @@ namespace util

void HTTPConnection::Terminate ()
{
if (!m_Stream || !m_Stream->IsOpen ()) return;
if (m_Stream)
m_Stream->Close ();

m_Socket->close ();
m_Socket->get_io_service ().post ([=](void)
{
i2p::stream::DeleteStream (m_Stream);
delete this;
//delete this;
});
}

Expand Down

0 comments on commit bd13406

Please sign in to comment.