]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winsftp.c
Only run one toplevel callback per event loop iteration.
[PuTTY.git] / windows / winsftp.c
index 23273507e36455883445ec833f0f367e6427bc56..25ac6c9482079b14e0b1218614f02aa77db2430b 100644 (file)
@@ -493,7 +493,9 @@ int do_eventsel_loop(HANDLE other_event)
     int skcount;
     unsigned long now = GETTICKCOUNT();
 
-    if (run_timers(now, &next)) {
+    if (toplevel_callback_pending()) {
+        ticks = 0;
+    } else if (run_timers(now, &next)) {
        then = now;
        now = GETTICKCOUNT();
        if (now - then > next - then)