Skip to content

Conversation

@anitgandhi
Copy link

Dial should not unconditionally sleep for that amount of time. If the conection succeeded via the asynchronous goroutine, we can simply return early.

This is particularly helpful in situations where one needs a higher handshake timeout, because now Dial won't just block for the full amount of time, allowing the program to move on to other work.

NOTE: This code is not tested; unfortunately we stopped using this library so I never got a chance to use or test this code. Sorry about that!

… sleep unconditionally

Dial should not unconditionally sleep for that amount of time. If the conection succeeded via the asynchronous goroutine, we can simply return early.

This is particularly helpful in situations where one needs a higher handshake timeout, because now Dial won't just block for the full amount of time, allowing the program to move on to other work.
@anitgandhi
Copy link
Author

@loeffel-io opened this PR per your request. As mentioned in the PR description, this change is unfortunately un-tested.

Feel free to modify as needed!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants