summaryrefslogtreecommitdiff
path: root/methods/connect.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-06-07 13:41:11 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-06-07 13:41:11 +0000
commit24057ad643f91253899a9cd66eaef0b2182f1230 (patch)
tree2e33f0eba72bc062bfda220540fc9f2114b7487f /methods/connect.cc
parent73edb1d9342a93be816e4c9b0c6ee42e8bc38bb6 (diff)
* report timeouts (from Connect) and fail if they happen in pkgAcqMetaSig
Diffstat (limited to 'methods/connect.cc')
-rw-r--r--methods/connect.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/methods/connect.cc b/methods/connect.cc
index 981ac1371..b85df6887 100644
--- a/methods/connect.cc
+++ b/methods/connect.cc
@@ -88,9 +88,11 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
/* 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);
+ }
// Check the socket for an error condition
unsigned int Err;