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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user