mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 10:40:28 +09:00
session: Check the session timeout and use it if set
This checks if a timeout has been set using ssh_options_set(). If it has been set it will use that parametr by default for blocking sessions. This is at least what users are expecting. Fixes T33 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -2751,7 +2751,7 @@ int ssh_channel_read_timeout(ssh_channel channel,
|
||||
ctx.buffer = stdbuf;
|
||||
ctx.count = 1;
|
||||
|
||||
if (timeout_ms < 0) {
|
||||
if (timeout_ms < SSH_TIMEOUT_DEFAULT) {
|
||||
timeout_ms = SSH_TIMEOUT_INFINITE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user