Set server status error on network failure

pull/704/head
Tatsuhiro Tsujikawa 2016-07-05 23:15:52 +09:00
parent 295affe160
commit a1ce6d2e7f
1 changed files with 5 additions and 0 deletions

View File

@ -304,6 +304,11 @@ bool AbstractCommand::execute()
}
if (errorEventEnabled()) {
// older kernel may report "connection refused" here.
auto ss = e_->getRequestGroupMan()->getOrCreateServerStat(
req_->getHost(), req_->getProtocol());
ss->setError();
throw DL_RETRY_EX(
fmt(MSG_NETWORK_PROBLEM, socket_->getSocketError().c_str()));
}