mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 06:05:58 -06:00
Core: Socket::Connect now sets the error description(s)
git-svn-id: svn://ultimatepp.org/upp/trunk@6241 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
2656d1a6da
commit
113820c19f
1 changed files with 5 additions and 1 deletions
|
|
@ -447,6 +447,7 @@ bool TcpSocket::RawConnect(addrinfo *arp)
|
|||
SetSockError("connect", -1, "not found");
|
||||
return false;
|
||||
}
|
||||
String err;
|
||||
for(int pass = 0; pass < 2; pass++) {
|
||||
addrinfo *rp = arp;
|
||||
while(rp) {
|
||||
|
|
@ -458,12 +459,15 @@ bool TcpSocket::RawConnect(addrinfo *arp)
|
|||
mode = CONNECT;
|
||||
return true;
|
||||
}
|
||||
if(err.GetCount())
|
||||
err << '\n';
|
||||
err << TcpSocketErrorDesc(GetErrorCode());
|
||||
Close();
|
||||
}
|
||||
rp = rp->ai_next;
|
||||
}
|
||||
}
|
||||
SetSockError("connect", -1, "failed");
|
||||
SetSockError("connect", -1, Nvl(err, "failed"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue