This version might also be slightly safer in case a call inside the
if-statement changes the truthiness of connWait.
theService->cfg().methodStr() << " " <<
theService->cfg().uri << status());
reuseConnection = false;
- if (connWait) {
+ const auto whileConnecting = bool(connWait);
+ if (whileConnecting) {
assert(!haveConnection());
theService->noteConnectionFailed("timedout");
} else
closeConnection(); // so that late Comm callbacks do not disturb bypass
- throw TexcHere(connWait ?
+ throw TexcHere(whileConnecting ?
"timed out while connecting to the ICAP service" :
"timed out while talking to the ICAP service");
}