]> git.tdb.fi Git - netvis.git/commitdiff
Remove host from Resolver's out queue as well when canceling
authorMikko Rasa <tdb@tdb.fi>
Sun, 15 Jun 2014 09:00:45 +0000 (12:00 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 15 Jun 2014 09:00:45 +0000 (12:00 +0300)
source/resolver.cpp

index 702ce9670d59100d649a47dd29a7df060dd557b2..b34fc65096a785b724950530d82f290ed602b583 100644 (file)
@@ -50,6 +50,13 @@ void Resolver::cancel(Host *h)
                        in_queue.erase(i);
                        break;
                }
+
+       for(list<Result>::iterator i=out_queue.begin(); i!=out_queue.end(); ++i)
+               if(i->host==h)
+               {
+                       out_queue.erase(i);
+                       break;
+               }
 }
 
 void Resolver::tick()