try fixing dht

pull/19/head
Jeff Becker 6 years ago
parent acc03fcad7
commit 91becb93c9
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -323,7 +323,7 @@ namespace llarp
/// inform all watches for key of values found /// inform all watches for key of values found
void void
Inform(const TXOwner& from, const K& key, std::vector< V > values, Inform(TXOwner from, K key, std::vector< V > values,
bool sendreply = false, bool removeTimeouts = true) bool sendreply = false, bool removeTimeouts = true)
{ {
auto range = waiting.equal_range(key); auto range = waiting.equal_range(key);
@ -339,14 +339,13 @@ namespace llarp
{ {
txitr->second->SendReply(); txitr->second->SendReply();
tx.erase(txitr); tx.erase(txitr);
itr = waiting.erase(itr);
continue;
} }
} }
++itr; ++itr;
} }
if(sendreply)
waiting.erase(key);
if(removeTimeouts) if(removeTimeouts)
timeouts.erase(key); timeouts.erase(key);
} }

Loading…
Cancel
Save