X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/d92dd27135d8a26793d3ad28534f2aaeb5fc7680..9b78cda6873104b80ffdbc8b5d3965575ce0a31d:/methods/connect.cc?ds=sidebyside diff --git a/methods/connect.cc b/methods/connect.cc index ea3794e16..a5af1f1a6 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -115,6 +115,9 @@ static bool DoConnect(struct addrinfo *Addr,string Host, errno = Err; if(errno == ECONNREFUSED) Owner->SetFailReason("ConnectionRefused"); + else if (errno == ETIMEDOUT) + Owner->SetFailReason("ConnectionTimedOut"); + bad_addr.insert(bad_addr.begin(), string(Name)); return _error->Errno("connect",_("Could not connect to %s:%s (%s)."),Host.c_str(), Service,Name); }