]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove watchers before recovering callback. So they get removed with a useful error...
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 17 Jul 2010 15:43:44 +0000 (03:43 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 17 Jul 2010 15:43:44 +0000 (03:43 +1200)
src/comm/ConnOpener.cc

index 7229d8a302512566c1d077d758bcd2a5f854e381..5cbe648a983a9fa10f0e87acf3600a4f456bc0dc 100644 (file)
@@ -56,11 +56,6 @@ ConnOpener::doneAll() const
 void
 ConnOpener::swanSong()
 {
-    // recover what we can from the job
-    if (solo != NULL && solo->fd > -1) {
-        callCallback(COMM_ERR_CONNECT, 0);
-    }
-
     // cancel any event watchers
     if (calls.earlyabort != NULL) {
         calls.earlyabort->cancel("ConnOpener::swanSong");
@@ -70,6 +65,11 @@ ConnOpener::swanSong()
         calls.timeout->cancel("ConnOpener::swanSong");
         calls.timeout = NULL;
     }
+
+    // recover what we can from the job
+    if (solo != NULL && solo->fd > -1) {
+        callCallback(COMM_ERR_CONNECT, 0);
+    }
 }
 
 void