Skip to content

Conversation

@vafada
Copy link
Contributor

@vafada vafada commented Jan 19, 2024

fixes #6708 ?

}

if (git_socket_stream__connect_timeout > 0) {
libssh2_session_set_timeout(s, git_socket_stream__connect_timeout);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should inherit the git_socket_stream__connect_timeout from the socket stream. So we already have connection timeouts.

I think that for this, we want to use GIT_OPT_SET_SERVER_TIMEOUT. So I think that this should be git_socket_stream__timeout instead...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated PR

@vafada vafada requested a review from ethomson January 26, 2024 18:38
The connect timeout *does* apply to SSH connections (at least libssh2),
so update the documentation appropriately.
@ethomson
Copy link
Member

ethomson commented Feb 5, 2024

Looks great — I added one change to the docs that is related but independent. (They stated that the connect timeout was not supported for SSH, in fact, it is.)

Thanks for the PR! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow set timeout for SSH connection.

2 participants