aboutsummaryrefslogtreecommitdiff
path: root/src/connect.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2014-10-15 10:27:55 +0200
committerAndreas Schneider <asn@cryptomilk.org>2014-10-15 10:27:55 +0200
commita48711ae7ef890c94e2a824afb899df385c406ee (patch)
tree20601d262e4b5cf13c17c6c795cfe1eddae280e9 /src/connect.c
parenta25790d34388d4f71371655d21a38d283ad4d85e (diff)
downloadlibssh-a48711ae7ef890c94e2a824afb899df385c406ee.tar.gz
libssh-a48711ae7ef890c94e2a824afb899df385c406ee.tar.xz
libssh-a48711ae7ef890c94e2a824afb899df385c406ee.zip
connect: Do not fail if the connect is in progress.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/connect.c')
-rw-r--r--src/connect.c2
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);