|
|
@ -328,7 +328,11 @@ namespace transport |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!session || session->GetRemoteEndpoint () != packet->from) // we received packet for other session than previous
|
|
|
|
if (!session || session->GetRemoteEndpoint () != packet->from) // we received packet for other session than previous
|
|
|
|
{ |
|
|
|
{ |
|
|
|
if (session) session->FlushData (); |
|
|
|
if (session) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
session->FlushData (); |
|
|
|
|
|
|
|
session = nullptr; |
|
|
|
|
|
|
|
} |
|
|
|
auto it = sessions->find (packet->from); |
|
|
|
auto it = sessions->find (packet->from); |
|
|
|
if (it != sessions->end ()) |
|
|
|
if (it != sessions->end ()) |
|
|
|
session = it->second; |
|
|
|
session = it->second; |
|
|
@ -751,10 +755,7 @@ namespace transport |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto session = it.second; |
|
|
|
auto session = it.second; |
|
|
|
if (it.first != session->GetRemoteEndpoint ()) |
|
|
|
if (it.first != session->GetRemoteEndpoint ()) |
|
|
|
{ |
|
|
|
|
|
|
|
LogPrint (eLogWarning, "SSU: remote endpoint ", session->GetRemoteEndpoint (), " doesn't match key ", it.first, " adjusted"); |
|
|
|
LogPrint (eLogWarning, "SSU: remote endpoint ", session->GetRemoteEndpoint (), " doesn't match key ", it.first, " adjusted"); |
|
|
|
session->SetRemoteEndpoint (it.first); // TODO: investigate why it happens
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
m_Service.post ([session] |
|
|
|
m_Service.post ([session] |
|
|
|
{ |
|
|
|
{ |
|
|
|
LogPrint (eLogWarning, "SSU: no activity with ", session->GetRemoteEndpoint (), " for ", session->GetTerminationTimeout (), " seconds"); |
|
|
|
LogPrint (eLogWarning, "SSU: no activity with ", session->GetRemoteEndpoint (), " for ", session->GetTerminationTimeout (), " seconds"); |
|
|
@ -782,10 +783,7 @@ namespace transport |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto session = it.second; |
|
|
|
auto session = it.second; |
|
|
|
if (it.first != session->GetRemoteEndpoint ()) |
|
|
|
if (it.first != session->GetRemoteEndpoint ()) |
|
|
|
{ |
|
|
|
LogPrint (eLogWarning, "SSU: remote endpoint ", session->GetRemoteEndpoint (), " doesn't match key ", it.first); |
|
|
|
LogPrint (eLogWarning, "SSU: remote endpoint ", session->GetRemoteEndpoint (), " doesn't match key ", it.first, " adjusted"); |
|
|
|
|
|
|
|
session->SetRemoteEndpoint (it.first); // TODO: investigate why it happens
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
m_ServiceV6.post ([session] |
|
|
|
m_ServiceV6.post ([session] |
|
|
|
{ |
|
|
|
{ |
|
|
|
LogPrint (eLogWarning, "SSU: no activity with ", session->GetRemoteEndpoint (), " for ", session->GetTerminationTimeout (), " seconds"); |
|
|
|
LogPrint (eLogWarning, "SSU: no activity with ", session->GetRemoteEndpoint (), " for ", session->GetTerminationTimeout (), " seconds"); |
|
|
|