Browse Source

fixed potential deadlock

pull/2013/head
orignal 11 months ago
parent
commit
85f5f5b91e
  1. 10
      libi2pd/Transports.h

10
libi2pd/Transports.h

@ -85,18 +85,14 @@ namespace transport
isReachable = (bool)router->GetCompatibleTransports (true); isReachable = (bool)router->GetCompatibleTransports (true);
} }
} }
~Peer ()
{
// drop not sent delayed messages
for (auto& it: delayedMessages)
it->Drop ();
}
void Done () void Done ()
{ {
for (auto& it: sessions) for (auto& it: sessions)
it->Done (); it->Done ();
// drop not sent delayed messages
for (auto& it: delayedMessages)
it->Drop ();
} }
void SetRouter (std::shared_ptr<const i2p::data::RouterInfo> r) void SetRouter (std::shared_ptr<const i2p::data::RouterInfo> r)

Loading…
Cancel
Save