mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-07 08:02:55 +03:00
session: Fix timeout handling.
-2 now means to use the timeout specified in options. It wasn't used earlier and poll only knows -1 and 0 anyway for special meanings.
This commit is contained in:
committed by
Andreas Schneider
parent
563fbe4de8
commit
af85337f5f
@@ -826,14 +826,14 @@ int ssh_get_kex1(ssh_session session) {
|
||||
ssh_log(session, SSH_LOG_PROTOCOL, "Waiting for a SSH_SMSG_PUBLIC_KEY");
|
||||
/* Here the callback is called */
|
||||
while(session->session_state==SSH_SESSION_STATE_INITIAL_KEX){
|
||||
ssh_handle_packets(session,-1);
|
||||
ssh_handle_packets(session, -2);
|
||||
}
|
||||
if(session->session_state==SSH_SESSION_STATE_ERROR)
|
||||
goto error;
|
||||
ssh_log(session, SSH_LOG_PROTOCOL, "Waiting for a SSH_SMSG_SUCCESS");
|
||||
/* Waiting for SSH_SMSG_SUCCESS */
|
||||
while(session->session_state==SSH_SESSION_STATE_KEXINIT_RECEIVED){
|
||||
ssh_handle_packets(session,-1);
|
||||
ssh_handle_packets(session, -2);
|
||||
}
|
||||
if(session->session_state==SSH_SESSION_STATE_ERROR)
|
||||
goto error;
|
||||
|
Reference in New Issue
Block a user