1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 08:14:15 +00:00

set error before status

This commit is contained in:
orignal 2022-12-22 08:36:07 -05:00
parent 3f728149ab
commit b6f83dfe9f

View File

@ -1667,8 +1667,8 @@ namespace transport
if (i2p::context.GetStatus () == eRouterStatusTesting || if (i2p::context.GetStatus () == eRouterStatusTesting ||
m_State == eSSU2SessionStatePeerTest) m_State == eSSU2SessionStatePeerTest)
{ {
i2p::context.SetError (eRouterErrorSymmetricNAT);
i2p::context.SetStatus (eRouterStatusFirewalled); i2p::context.SetStatus (eRouterStatusFirewalled);
i2p::context.SetError (eRouterErrorSymmetricNAT);
m_Server.RescheduleIntroducersUpdateTimer (); m_Server.RescheduleIntroducersUpdateTimer ();
} }
} }
@ -1677,8 +1677,8 @@ namespace transport
if (i2p::context.GetStatusV6 () == eRouterStatusTesting || if (i2p::context.GetStatusV6 () == eRouterStatusTesting ||
m_State == eSSU2SessionStatePeerTest) m_State == eSSU2SessionStatePeerTest)
{ {
i2p::context.SetErrorV6 (eRouterErrorSymmetricNAT);
i2p::context.SetStatusV6 (eRouterStatusFirewalled); i2p::context.SetStatusV6 (eRouterStatusFirewalled);
i2p::context.SetErrorV6 (eRouterErrorSymmetricNAT);
m_Server.RescheduleIntroducersUpdateTimerV6 (); m_Server.RescheduleIntroducersUpdateTimerV6 ();
} }
} }
@ -1689,17 +1689,19 @@ namespace transport
{ {
if (i2p::context.GetError () == eRouterErrorSymmetricNAT) if (i2p::context.GetError () == eRouterErrorSymmetricNAT)
{ {
i2p::context.SetError (eRouterErrorNone);
if (m_State == eSSU2SessionStatePeerTest) if (m_State == eSSU2SessionStatePeerTest)
i2p::context.SetStatus (eRouterStatusOK); i2p::context.SetStatus (eRouterStatusOK);
i2p::context.SetError (eRouterErrorNone);
} }
} }
else else
{ {
if (i2p::context.GetErrorV6 () == eRouterErrorSymmetricNAT) if (i2p::context.GetErrorV6 () == eRouterErrorSymmetricNAT)
{
if (m_State == eSSU2SessionStatePeerTest)
i2p::context.SetStatusV6 (eRouterStatusOK);
i2p::context.SetErrorV6 (eRouterErrorNone); i2p::context.SetErrorV6 (eRouterErrorNone);
if (m_State == eSSU2SessionStatePeerTest) }
i2p::context.SetStatusV6 (eRouterStatusOK);
} }
} }
} }