mirror of https://github.com/MidnightCommander/mc
(sftpfs_open_connection): handle EAGAIN for libssh2_session_handshake().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
b0450a1e18
commit
fdd6706245
|
@ -464,11 +464,14 @@ sftpfs_open_connection (struct vfs_s_super *super, GError ** mcerror)
|
|||
/* ... start it up. This will trade welcome banners, exchange keys,
|
||||
* and setup crypto, compression, and MAC layers
|
||||
*/
|
||||
rc = libssh2_session_handshake (sftpfs_super->session,
|
||||
(libssh2_socket_t) sftpfs_super->socket_handle);
|
||||
while ((rc =
|
||||
libssh2_session_handshake (sftpfs_super->session,
|
||||
(libssh2_socket_t) sftpfs_super->socket_handle)) ==
|
||||
LIBSSH2_ERROR_EAGAIN)
|
||||
;
|
||||
if (rc != 0)
|
||||
{
|
||||
mc_propagate_error (mcerror, rc, "%s", _("sftp: Failure establishing SSH session"));
|
||||
mc_propagate_error (mcerror, rc, "%s", _("sftp: failure establishing SSH session"));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue