From 5174306b22f9a7f761ee00b24ada9cb3211cc09e Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 15 Jun 2014 12:00:45 +0300 Subject: [PATCH] Remove host from Resolver's out queue as well when canceling --- source/resolver.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/resolver.cpp b/source/resolver.cpp index 702ce96..b34fc65 100644 --- a/source/resolver.cpp +++ b/source/resolver.cpp @@ -50,6 +50,13 @@ void Resolver::cancel(Host *h) in_queue.erase(i); break; } + + for(list::iterator i=out_queue.begin(); i!=out_queue.end(); ++i) + if(i->host==h) + { + out_queue.erase(i); + break; + } } void Resolver::tick() -- 2.45.2