-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow setting timeouts for connection #11
Comments
Do you have any example of libraries that let you specify all the possible timeouts? Usually there is a high level timeout or two, but SSH has a lot of ones as you mention. Perhaps a |
I don't have any public examples. This comes from our config struct though (all the ones we support internally): // HandshakeTimeout is the amount of time allowed between connecting and
// successful auth.
HandshakeTimeout time.Duration
// NewChannelTimeout is the amount of time allowed between auth and making
// the first valid channel.
NewChannelTimeout time.Duration
// ChannelRequestTimeout is the amount of time allowed between creating a
// channel and making the first valid request.
ChannelRequestTimeout time.Duration
// ConnectionCloseTimeout is the amount of time allowed between when the
// command finishes running and the connection is forcefully closed.
ConnectionCloseTimeout time.Duration |
I realize this won't be used by everyone, or even most people, so I'd be happy to do the work to support most of the features I'm proposing. |
What do you think of wrapping these in a struct:
|
That works for me. Other notes from our discussion:
|
I have created a pull request to support handshake timeout: #204 |
I've stumbled over this issue here and i'm wondering if it's also a valid use-case to have a timeout where the more context: we are using https://github.com/owenthereal/upterm which spawn a |
Specifically for the handshake, requesting a session, starting a command, and connection closing.
The text was updated successfully, but these errors were encountered: