Skip to content

TLS handshake hangs and blocks forever #179

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

Closed
dannin opened this issue Oct 31, 2016 · 4 comments
Closed

TLS handshake hangs and blocks forever #179

dannin opened this issue Oct 31, 2016 · 4 comments

Comments

@dannin
Copy link

dannin commented Oct 31, 2016

Hi, I logged the following bug against golang.
Not sure if this is actually a symptom from gorilla websocket:
golang/go#17708

@garyburd
Copy link
Contributor

Please provide more information. Show the Dialer that you are using. What software is running on the server? Can you connect to the server with a different client (a browser for example)?

@dannin
Copy link
Author

dannin commented Oct 31, 2016

Basically it looks like this:
d := websocket.Dialer{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
NetDial: func(network, addr string) (net.Conn, error) {
const timeout = 30 * time.Second
return net.DialTimeout(network, serverAddr, timeout)
},
TLSClientConfig: tlsConfig,
}

ws, _, err = d.Dial(u.String(), wsHeaders)

@dannin
Copy link
Author

dannin commented Oct 31, 2016

It also works most of the time. Just when the server goes down intermittenly or theres dns resolution error, sometimes around that time it hangs

@dannin
Copy link
Author

dannin commented Oct 31, 2016

@garyburd Any idea? Does that look right? I return a net.Conn with a timeout via the NetDial

@dannin dannin closed this as completed Oct 31, 2016
@gorilla gorilla locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants