|
|
|
@ -211,10 +211,12 @@ namespace transport
@@ -211,10 +211,12 @@ namespace transport
|
|
|
|
|
|
|
|
|
|
void SSUServer::HandleReceivedPackets (std::vector<SSUPacket *> packets) |
|
|
|
|
{ |
|
|
|
|
std::shared_ptr<SSUSession> session; |
|
|
|
|
for (auto it1: packets) |
|
|
|
|
{ |
|
|
|
|
auto packet = it1; |
|
|
|
|
std::shared_ptr<SSUSession> session; |
|
|
|
|
if (session && session->GetRemoteEndpoint () != packet->from) // we received packet for other session than previous
|
|
|
|
|
{ |
|
|
|
|
auto it = m_Sessions.find (packet->from); |
|
|
|
|
if (it != m_Sessions.end ()) |
|
|
|
|
session = it->second; |
|
|
|
@ -228,6 +230,7 @@ namespace transport
@@ -228,6 +230,7 @@ namespace transport
|
|
|
|
|
} |
|
|
|
|
LogPrint ("New SSU session from ", packet->from.address ().to_string (), ":", packet->from.port (), " created"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
session->ProcessNextMessage (packet->buf, packet->len, packet->from); |
|
|
|
|
delete packet; |
|
|
|
|
} |
|
|
|
|