-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Websocket Upgrade blocking forever #246
Comments
Can you show a reproducible example?
Also: the call to upgrader.Upgrade returns a *Conn and an error, and you
don't appear to be assigning either in the code above.
…On Thu, Jun 1, 2017 at 9:58 PM Nguyễn Trường Minh ***@***.***> wrote:
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.8.1 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
set GOOS=windows
set GOPATH=E:\Coding\Go\Lib;E:\Coding\Go\Repo
set GORACE=
set GOROOT=D:\Coding\Go
set GOTOOLDIR=D:\Coding\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1
set PKG_CONFIG=pkg-config
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
What did you do?
var upgrader = websocket.Upgrader{
CheckOrigin: func(r *http.Request) bool {
return true
}
}
func (s *RoomServer) upgrade(w http.ResponseWriter, r *http.Request)
*websocket.Conn {
upgrader.Upgrade(w, r, nil)
// sometime do not reach
}
I found that the piece of code that block is the hijack method of http conn
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#246>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABIcEp8cwbJAnLkJi6Nesqoxb9kC6ihks5r_5Z6gaJpZM4Nt1Kb>
.
|
Possible duplicate of #232. Check that the system time is correct. |
The hijack issue was fixed in 1.8.1. Please report the stack trace of the blocked goroutine. You can get a stack dump by sending the process SIGQUIT. |
@garyburd it is the hijack issue, exactly. |
You report that you are running Go 1.8.1. The fix for the hijack issue is included in Go 1.8.1. Check that your system clock is set to the current time. |
The clock is in 2017. It isn't related to the set read time out for net.Conn mentioned in the above case. |
Perhaps there's a Windows specific issue with Hijack. File an issue with the Go project. Include a stack trace of the blocked goroutine. |
Thank @garyburd for your helps |
What version of Go are you using (
go version
)?go version go1.8.1 windows/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
I found that the piece of code that blocks is the hijack method of http conn
The text was updated successfully, but these errors were encountered: