Skip to content

Commit 4c14160

Browse files
Roytakmichalvasko
authored andcommitted
io UPDATE unify SSH connected check
Perform SSH connection aliveness check just like with other transports and don't rely on libssh internal state tracking.
1 parent f031e03 commit 4c14160

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/io.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,8 @@ nc_session_is_connected(const struct nc_session *session)
528528
break;
529529
#ifdef NC_ENABLED_SSH_TLS
530530
case NC_TI_SSH:
531-
return ssh_is_connected(session->ti.libssh.session);
531+
fds.fd = ssh_get_fd(session->ti.libssh.session);
532+
break;
532533
case NC_TI_TLS:
533534
fds.fd = nc_tls_get_fd_wrap(session);
534535
break;

0 commit comments

Comments
 (0)