fd = -1;
state->d_responseReadTime = now;
- handleResponse(state, now);
+ try {
+ handleResponse(state, now);
+ }
+ catch (const std::exception& e) {
+ vinfolog("Got an exception while handling TCP response from %s (client is %s): %s", state->d_ds ? state->d_ds->getName() : "unknown", state->d_ci.remote.toStringWithPort(), e.what());
+ }
return;
}
}
}
/* don't increase this counter when reusing connections */
- if (state->d_downstreamConnection->isFresh()) {
+ if (state->d_downstreamConnection && state->d_downstreamConnection->isFresh()) {
++state->d_downstreamFailures;
}
if (state->d_outstanding && state->d_ds != nullptr) {