diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2014-10-15 10:27:55 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2014-10-28 10:33:47 +0100 |
commit | 32a3cfe6613262cc6e84a0c5cdf9803184e9c2ce (patch) | |
tree | eb972db5e443493f730daea0749191aa53a98549 | |
parent | 1c59844dfee03ad7cba78665c6d7fbdf0abb58a8 (diff) | |
download | libssh-32a3cfe6613262cc6e84a0c5cdf9803184e9c2ce.tar.gz libssh-32a3cfe6613262cc6e84a0c5cdf9803184e9c2ce.tar.xz libssh-32a3cfe6613262cc6e84a0c5cdf9803184e9c2ce.zip |
connect: Do not fail if the connect is in progress.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit a48711ae7ef890c94e2a824afb899df385c406ee)
-rw-r--r-- | src/connect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/connect.c b/src/connect.c index 807b1faf..4ef85bc4 100644 --- a/src/connect.c +++ b/src/connect.c @@ -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); |