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

session: skip timestamp init for non-blocking case

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jon Simons
2014-02-04 19:04:16 -08:00
committed by Andreas Schneider
parent 93370d61ba
commit fa34d11749

View File

@@ -599,7 +599,11 @@ int ssh_handle_packets_termination(ssh_session session,
}
}
/* avoid unnecessary syscall for the SSH_TIMEOUT_NONBLOCKING case */
if (timeout != SSH_TIMEOUT_NONBLOCKING) {
ssh_timestamp_init(&ts);
}
tm = timeout;
while(!fct(user)) {
ret = ssh_handle_packets(session, tm);