-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
net/http: gorilla/websocket.Upgrade will be blocked in http.(*response).Hijack #20963
Comments
Sorry, this is the issue tracker for Go. Looks like your issue depends on the external package: https://godoc.org/github.com/gorilla/websocket. Probably It's better to ask your question at https://github.com/gorilla/websocket/issues. |
@mikioh |
Nope, sorry. If you think the net/http package has some issue, can you please provide a simple reproducible example not using external packages like gorilla/websocket? |
I am encountering the same issue where |
Nevermind – I've found the cause for my deadlock in #15224. The http1 server in go 1.8 and 1.9 relies on the correct implementation of the In the |
@boquan58, same for you perhaps? |
sorry, i'm not sure, maybe it's the problem of my win7 os, the same binary work fine on others win7 os. and it also works fine on my pc after i reinstall win7 |
With Windows mysteries, 9 times out of 10, the answer is anti-virus or malware hooking system calls poorly. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8.3 windows/amd64
What operating system and processor architecture are you using (
go env
)?set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows (win7)
set GOOS=windows
What did you do?
i use gorilla/websocket, and when Upgrade, it will be blocked in Hijack. the sample code of echo in gorilla/websocket will blocked sometimes on windows, and if i add a line
time.Sleep(10 * time.Millisecond)
before Upgrade, then it will almost 100% reproduce.the blocked goroutine stack just like this:
What did you expect to see?
Upgrade will return soon
What did you see instead?
Upgrade blocked forever
similar discussion in gorilla/websocket, please see this issue
the sample whole code is below:
it seems will only blocked on windows, it runs fine on linux.
server.go
client.go
The text was updated successfully, but these errors were encountered: