]> git.saurik.com Git - apt.git/blobdiff - methods/connect.cc
* merged the apt--sane-handle-timeout--0 branch
[apt.git] / methods / connect.cc
index 981ac1371cc1d902eabf011fb398f5126db94466..b85df68874a8524b83610e31db743725eb43196f 100644 (file)
@@ -88,9 +88,11 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
    
    /* This implements a timeout for connect by opening the connection
       nonblocking */
    
    /* This implements a timeout for connect by opening the connection
       nonblocking */
-   if (WaitFd(Fd,true,TimeOut) == false)
+   if (WaitFd(Fd,true,TimeOut) == false) {
+      Owner->SetFailExtraMsg("\nFailReason: Timeout");
       return _error->Error(_("Could not connect to %s:%s (%s), "
                           "connection timed out"),Host.c_str(),Service,Name);
       return _error->Error(_("Could not connect to %s:%s (%s), "
                           "connection timed out"),Host.c_str(),Service,Name);
+   }
 
    // Check the socket for an error condition
    unsigned int Err;
 
    // Check the socket for an error condition
    unsigned int Err;