]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
fixup: Do not rely on dieOnConnectionFailure() to throw (so much)
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 14 Jul 2021 21:45:01 +0000 (17:45 -0400)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 16 Jul 2021 17:33:09 +0000 (13:33 -0400)
That method should probably be rewritten to avoid excessive throwing in
favor of mustStop() or a similar call, but that polishing is outside
this branch scope. Let's just attempt to minimize future code changes
by not relying on dieOnConnectionFailure() unwinding the stack.

src/adaptation/icap/Xaction.cc

index 4ae30fc599f6fae5cf28131efb6fdf13ac85be08..3e3de02188467e51e104702c85e5c6cc7b65d2ca 100644 (file)
@@ -269,8 +269,8 @@ void Adaptation::Icap::Xaction::noteCommConnected(const CommConnectCbParams &io)
 
     if (io.flag != Comm::OK)
         dieOnConnectionFailure(); // throws
-
-    successfullyConnected();
+    else
+        successfullyConnected();
 }
 
 /// called when successfully connected to an ICAP service