[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Setting timeout for ssh_connect() only
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: Setting timeout for ssh_connect() only
- From: g4-lisz@xxxxxxxxxxxx
- Reply-to: libssh@xxxxxxxxxx
- Date: Tue, 01 Jul 2025 11:24:19 +0000
- To: libssh@xxxxxxxxxx
Hi there If I interpret the code right, there's a default timeout for ssh_connect() of 10 seconds as long as no user timeouts are set (and the session is blocking). IMHO the timeout for opening the connection should not be coupled to the general polling timeout... It would be a nice feature to have an option for ssh_connect() only, e.g SSH_OPTIONS_CONNECT_TIMEOUT. Or through a second parameter: ssh_connect(session, timeout). Will this work as intended? int conn_timeout = 5; // custom connect timeout ssh_options_set(session, SSH_OPTIONS_TIMEOUT, conn_timeout); ret = ssh_connect(session); /* handle ret */ ssh_options_set(session, SSH_OPTIONS_TIMEOUT, 0); Does SSH_OPTIONS_TIMEOUT 0 set the default behavior? Cheers Till
Re: Setting timeout for ssh_connect() only | Jakub Jelen <jjelen@xxxxxxxxxx> |
Re: Setting timeout for ssh_connect() only | g4-lisz@xxxxxxxxxxxx |