]> git.saurik.com Git - apt.git/blobdiff - methods/connect.cc
test-indexes.sh: Add source related tests, which uncovers two regressions
[apt.git] / methods / connect.cc
index adb16a19973c9341dfc9b38f0a311f913cac63a2..2f6b4833e2e636ccf12e87ce8c6b3d5ab86796eb 100644 (file)
@@ -116,6 +116,9 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
       errno = Err;
       if(errno == ECONNREFUSED)
          Owner->SetFailExtraMsg("\nFailReason: ConnectionRefused");
       errno = Err;
       if(errno == ECONNREFUSED)
          Owner->SetFailExtraMsg("\nFailReason: ConnectionRefused");
+      else if (errno == ETIMEDOUT)
+        Owner->SetFailExtraMsg("\nFailReason: 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);
    }
       return _error->Errno("connect",_("Could not connect to %s:%s (%s)."),Host.c_str(),
                           Service,Name);
    }