fixed race condition between local buffer creation and sending it through the transports

This commit is contained in:
orignal 2024-05-26 15:33:37 -04:00
parent 7dc5a04b8d
commit acbd3f897b
8 changed files with 51 additions and 18 deletions

View file

@ -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 ();