network_engine: expire requests when clearing NE

This is to prevent any thread relying on network_engine's callback to block
forever just like the Dht::sendPing's callback.
This commit is contained in:
Simon Désaulniers authored and Adrien Béraud committed 2016-10-10 01:51:26 -04:00
1 parent 64118404fe
commit 8567b7ad84
1 file changed
+1 -1
+1 -1
View File
@@ -131,7 +131,7 @@ void
NetworkEngine::clear()
{
for (auto& req : requests)
req.second->cancel();
req.second->setExpired();
requests.clear();
}