From: Amos Jeffries Date: Sat, 17 Jul 2010 15:43:44 +0000 (+1200) Subject: Remove watchers before recovering callback. So they get removed with a useful error... X-Git-Tag: take08~55^2~124^2~114 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4590cc7d4aa8a846789adf6067c94f0e824a4b17;p=thirdparty%2Fsquid.git Remove watchers before recovering callback. So they get removed with a useful error reason --- diff --git a/src/comm/ConnOpener.cc b/src/comm/ConnOpener.cc index 7229d8a302..5cbe648a98 100644 --- a/src/comm/ConnOpener.cc +++ b/src/comm/ConnOpener.cc @@ -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