mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
pass I2NP message to transport session as shared_ptr
This commit is contained in:
@@ -255,11 +255,17 @@ namespace transport
|
||||
}
|
||||
}
|
||||
if (!it->second.sessions.empty ())
|
||||
it->second.sessions.front ()->SendI2NPMessages (msgs);
|
||||
{
|
||||
// TODO: remove this copy operation later
|
||||
std::vector<std::shared_ptr<i2p::I2NPMessage> > msgs1;
|
||||
for (auto it1: msgs)
|
||||
msgs1.push_back (ToSharedI2NPMessage(it1));
|
||||
it->second.sessions.front ()->SendI2NPMessages (msgs1);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (auto it1: msgs)
|
||||
it->second.delayedMessages.push_back (it1);
|
||||
it->second.delayedMessages.push_back (ToSharedI2NPMessage(it1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user