mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
show correct tunnel status. restore tunnel if delivery status or data for inbound tunnel received
This commit is contained in:
parent
710b27688b
commit
0e502c49b5
3 changed files with 10 additions and 14 deletions
|
@ -250,7 +250,7 @@ namespace tunnel
|
|||
|
||||
void InboundTunnel::HandleTunnelDataMsg (std::shared_ptr<I2NPMessage>&& msg)
|
||||
{
|
||||
if (IsFailed ()) SetState (eTunnelStateEstablished); // incoming messages means a tunnel is alive
|
||||
if (GetState () != eTunnelStateExpiring) SetState (eTunnelStateEstablished); // incoming messages means a tunnel is alive
|
||||
EncryptTunnelMsg (msg, msg);
|
||||
msg->from = GetSharedFromThis ();
|
||||
m_Endpoint.HandleDecryptedTunnelDataMsg (msg);
|
||||
|
|
|
@ -461,7 +461,7 @@ namespace tunnel
|
|||
// restore from test failed state if any
|
||||
if (test.first)
|
||||
{
|
||||
if (test.first->GetState () == eTunnelStateTestFailed)
|
||||
if (test.first->GetState () != eTunnelStateExpiring)
|
||||
test.first->SetState (eTunnelStateEstablished);
|
||||
// update latency
|
||||
uint64_t latency = 0;
|
||||
|
@ -471,7 +471,7 @@ namespace tunnel
|
|||
}
|
||||
if (test.second)
|
||||
{
|
||||
if (test.second->GetState () == eTunnelStateTestFailed)
|
||||
if (test.second->GetState () != eTunnelStateExpiring)
|
||||
test.second->SetState (eTunnelStateEstablished);
|
||||
// update latency
|
||||
uint64_t latency = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue