Skip to content
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

v1: Fix connection hang #615

Open
wants to merge 2 commits into
base: v1
Choose a base branch
from

Conversation

doganpoyraz
Copy link

@doganpoyraz doganpoyraz commented Apr 25, 2024

This PR fixes the issue described in #611.

If the server does not respond to the Support calls in the New() function, the function blocks infinitely. Even if we supply a dialer with a timeout, there are 2 consequent Support calls. The first one runs with a deadline value but during the execution of the 2nd one, the deadline was set to the zero value. Setting the timeout value to the client is not enough because the client is not returned to the user yet.

I also added an optional timeout parameter to the DialWithDialer functions because callers may supply a Dialer that wraps the net.Dialer, which was our case.

Set timeout value to the client to supply deadline values to Support calls in the client.New function
@doganpoyraz doganpoyraz reopened this Apr 25, 2024
@doganpoyraz doganpoyraz force-pushed the fix-connection-hang branch from 68dd0ca to 3f11740 Compare April 25, 2024 14:58
@emersion emersion changed the title Fix connection hang v1: Fix connection hang Sep 16, 2024
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.

1 participant