mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-13 04:42:23 +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:
@@ -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);
|
rc = connect(s, itr->ai_addr, itr->ai_addrlen);
|
||||||
if (rc == -1) {
|
if (rc == -1 && (errno != EINPROGRESS)) {
|
||||||
ssh_set_error(session, SSH_FATAL,
|
ssh_set_error(session, SSH_FATAL,
|
||||||
"Failed to connect: %s", strerror(errno));
|
"Failed to connect: %s", strerror(errno));
|
||||||
ssh_connect_socket_close(s);
|
ssh_connect_socket_close(s);
|
||||||
|
Reference in New Issue
Block a user