1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-10 06:23:01 +03:00

connect: Do not fail if the connect is in progress.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2014-10-15 10:27:55 +02:00
parent a25790d343
commit a48711ae7e

View File

@@ -383,7 +383,7 @@ socket_t ssh_connect_host_nonblocking(ssh_session session, const char *host,
}
rc = connect(s, itr->ai_addr, itr->ai_addrlen);
if (rc == -1) {
if (rc == -1 && (errno != EINPROGRESS)) {
ssh_set_error(session, SSH_FATAL,
"Failed to connect: %s", strerror(errno));
ssh_connect_socket_close(s);