singleipconnect() did not return the open socket descriptor on some
errors, thereby sometimes causing a socket leak. This patch ensures
the socket is always returned.
conn->bits.ipv6 = (addr.family == AF_INET6)?TRUE:FALSE;
#endif
+ *sockp = sockfd;\r
+\r
if(-1 == rc) {
switch (error) {
case EINPROGRESS:
case EAGAIN:
#endif
#endif
- *sockp = sockfd;
return CURLE_OK;
default:
return CURLE_COULDNT_CONNECT;
}
}
- else
- *sockp = sockfd;
return CURLE_OK;
}