Does anyone know the default timeout for Session and Channel.
session.connect();
channel.connect();
I am going through the document but it doesn't explicitly say what is the default timeout ?
For the Channel
, the default timeout seems to be 20 seconds.
See the implementation of the Channel.sendChannelOpen()
.
The timeout here defines, how long will the connect()
wait for a response to open channel request. I'd say that the name of the method is confusing, it should be open()
. You are not connecting anywhere (the session is already open).
For the Session
, the default timeout is set using the setTimeout()
method. If not set, the default default is 0, what means "infinite". Though there's always some last resort timeout on an OS-level.
The timeout here defines:
connect()
wait for the socket to open. Socket.SetSoTimeout
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.