diff options
-rw-r--r-- | src/auth.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -71,8 +71,13 @@ static int ssh_userauth_request_service(ssh_session session) do { rc = ssh_service_request(session,"ssh-userauth"); if (ssh_is_blocking(session)) { - if(rc == SSH_AGAIN) - ssh_handle_packets(session, -2); + if (rc == SSH_AGAIN) { + int err = ssh_handle_packets(session, -2); + if (err != SSH_OK) { + /* error or timeout */ + return SSH_ERROR; + } + } } else { /* nonblocking */ ssh_handle_packets(session, 0); |