X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/9fcbe2047293f8ef703439264ed3d35701f51638..ef38181605be2f7131bed9865d965300339389b5:/methods/connect.cc 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); }