Skip to content

Commit

Permalink
show local destination's tuunels state
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Nov 30, 2014
1 parent e6c92a5 commit fbec753
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions HTTPServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,14 @@ namespace util
void HTTPConnection::Terminate ()
{
if (m_Stream)
{
m_Stream->Close ();
i2p::stream::DeleteStream (m_Stream);
m_Stream.reset ();
}

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

void HTTPConnection::Receive ()
Expand Down Expand Up @@ -810,11 +811,21 @@ namespace util
for (auto it: pool->GetOutboundTunnels ())
{
it->GetTunnelConfig ()->Print (s);
auto state = it->GetState ();
if (state == i2p::tunnel::eTunnelStateFailed)
s << " " << "Failed";
else if (state == i2p::tunnel::eTunnelStateExpiring)
s << " " << "Exp";
s << "<br>" << std::endl;
}
for (auto it: pool->GetInboundTunnels ())
{
it->GetTunnelConfig ()->Print (s);
auto state = it->GetState ();
if (state == i2p::tunnel::eTunnelStateFailed)
s << " " << "Failed";
else if (state == i2p::tunnel::eTunnelStateExpiring)
s << " " << "Exp";
s << "<br>" << std::endl;
}
}
Expand Down

0 comments on commit fbec753

Please sign in to comment.