X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/7803558c3a48163ee6d9e2022b593c23e29004c3..eb3947c6510042c054a319d8053821faf7244dea:/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); }