diff options
Diffstat (limited to 'methods/connect.cc')
-rw-r--r-- | methods/connect.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/methods/connect.cc b/methods/connect.cc index 981ac1371..4e48927ed 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; @@ -164,8 +166,11 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd, } if (Res == EAI_AGAIN) + { + Owner->SetFailExtraMsg("\nFailReason: TmpResolveFailure"); return _error->Error(_("Temporary failure resolving '%s'"), Host.c_str()); + } return _error->Error(_("Something wicked happened resolving '%s:%s' (%i)"), Host.c_str(),ServStr,Res); } |