mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
fixed race condition between local buffer creation and sending it through the transports
This commit is contained in:
parent
7dc5a04b8d
commit
acbd3f897b
8 changed files with 51 additions and 18 deletions
|
@ -1120,6 +1120,12 @@ namespace data
|
|||
m_Buffer->SetBufferLen (len);
|
||||
}
|
||||
|
||||
std::shared_ptr<RouterInfo::Buffer> RouterInfo::CopyBuffer () const
|
||||
{
|
||||
if (!m_Buffer) return nullptr;
|
||||
return netdb.NewRouterInfoBuffer (*m_Buffer);
|
||||
}
|
||||
|
||||
std::shared_ptr<RouterInfo::Buffer> RouterInfo::NewBuffer () const
|
||||
{
|
||||
return netdb.NewRouterInfoBuffer ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue