From ac445a1e189f2bb5730dec6f6b7205a53defd224 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 26 Aug 2011 23:56:49 +0200 Subject: auth: Handle request service timeout in blocking mode. (cherry picked from commit e5e673bafe18032df3b6b7634410a6795e809f2a) --- src/auth.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/auth.c b/src/auth.c index cf6c13cb..009340f9 100644 --- a/src/auth.c +++ b/src/auth.c @@ -68,8 +68,13 @@ static int ask_userauth(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); -- cgit