1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

auth: Handle request service timeout in blocking mode.

This commit is contained in:
Andreas Schneider
2011-08-26 23:56:49 +02:00
parent 79ed1bc601
commit e5e673bafe

View File

@@ -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);