[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r1505: Stop the other queue timer when one times out and calls the (trunk/src/gui/network)



Author: edmanm
Date: 2006-12-08 21:42:21 -0500 (Fri, 08 Dec 2006)
New Revision: 1505

Modified:
   trunk/src/gui/network/netviewer.cpp
Log:
Stop the other queue timer when one times out and calls the resolve() slot,
even when we decide now is not the time to send a request. Also remove a
#define we don't use anymore.


Modified: trunk/src/gui/network/netviewer.cpp
===================================================================
--- trunk/src/gui/network/netviewer.cpp	2006-12-09 00:49:51 UTC (rev 1504)
+++ trunk/src/gui/network/netviewer.cpp	2006-12-09 02:42:21 UTC (rev 1505)
@@ -35,9 +35,6 @@
 #define IMG_ZOOMIN  ":/images/22x22/zoom-in.png"
 #define IMG_ZOOMOUT ":/images/22x22/zoom-out.png"
 
-/** Maximum time to proceess other events while loading the long list of
- * router descriptors. */
-#define MAX_EVENTS_TIMEOUT  25
 /** Number of milliseconds to wait after the arrival of the last descriptor whose
  * IP needs to be resolved to geographic information, in case more descriptors
  * arrive. Then we can simply lump the IPs into a single request. */
@@ -375,10 +372,12 @@
       /* Flush the resolve queue and stop the timers */
       _geoip.resolve(_resolveQueue);
       _resolveQueue.clear();
-      _minResolveQueueTimer.stop();
-      _maxResolveQueueTimer.stop();
     }
   }
+  /* Stop the queue timers. Only one should be active since the other is what
+   * called this slot, but calling stop() on a stopped timer does not hurt. */
+  _minResolveQueueTimer.stop();
+  _maxResolveQueueTimer.stop();
 }
 
 /** Called when a list of GeoIp information has been resolved. */