1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

use emplace not try_emplace for backport

This commit is contained in:
Jeff Becker 2018-05-29 10:57:13 -04:00
parent edc477b071
commit 6ce74fe130
No known key found for this signature in database
GPG key ID: F357B3B42F6F9B05

View file

@ -409,7 +409,7 @@ namespace iwp
if(x.flags() & 0x01)
{
auto id = x.msgid();
auto itr = rx.try_emplace(id, x);
auto itr = rx.emplace(id, x);
if(itr.second)
{
// inserted, put last fragment
@ -449,7 +449,7 @@ namespace iwp
void
queue_tx(uint64_t id, transit_message *msg)
{
auto itr = tx.try_emplace(id, msg);
auto itr = tx.emplace(id, msg);
if(itr.second)
{
msg->generate_xmit(sendqueue);