]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3091 fix: Bypassed ICAP errors are not counted as service failures.
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 7 Nov 2010 03:07:29 +0000 (21:07 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Sun, 7 Nov 2010 03:07:29 +0000 (21:07 -0600)
Notify ICAP service about the failure even if we can bypass it. Otherwise,
a failing service may continue to stay "up", preventing Squid from using a
healthy backup alternative in a service_set (or bypassing ICAP completeley).

src/adaptation/icap/ModXact.cc

index 8e679921f95c5bc6a89cf487cbeec4b30da78ed6..9fed32bb962c4ad3a09f0a6320bf56499997fd4e 100644 (file)
@@ -652,6 +652,8 @@ void Adaptation::Icap::ModXact::bypassFailure()
         if (!doneWithIo())
             debugs(93, 7, HERE << "Warning: bypass failed to stop I/O" << status());
     }
+
+    service().noteFailure(); // we are bypassing, but this is still a failure
 }
 
 void Adaptation::Icap::ModXact::disableBypass(const char *reason, bool includingGroupBypass)