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

Unhandled error causing panic #42

Open
razum90 opened this issue Aug 7, 2021 · 1 comment · May be fixed by #52
Open

Unhandled error causing panic #42

razum90 opened this issue Aug 7, 2021 · 1 comment · May be fixed by #52

Comments

@razum90
Copy link

razum90 commented Aug 7, 2021

Hi,

I encountered the following error in my application:

panic: runtime error: invalid memory address or nil pointer dereference[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7d96d0]goroutine 59856 [running]:github.com/gorilla/websocket.(*Conn).SetPongHandler(0x0, 0xc003712960) /go/pkg/mod/github.com/gorilla/[email protected]/conn.go:1160 +0x20github.com/recws-org/recws.(*RecConn).keepAlive(0x1399a00) /go/pkg/mod/github.com/recws-org/[email protected]/recws.go:365 +0xc5github.com/recws-org/recws.(*RecConn).connect(0x1399a00) /go/pkg/mod/github.com/recws-org/[email protected]/recws.go:422 +0x3cacreated by github.com/recws-org/recws.(*RecConn).CloseAndReconnect /go/pkg/mod/github.com/recws-org/[email protected]/recws.go:64 +0x4d

Looks to happen because the error on this line is not being handled, but I might be wrong:

recws/recws.go

Line 365 in 37f9e46

rc.Conn.SetPongHandler(func(msg string) error {

Any ideas how to go about this?

Thank you.

@nikepan nikepan linked a pull request Aug 12, 2022 that will close this issue
@nikepan
Copy link

nikepan commented Sep 7, 2022

It can happens when ConnectHandler execute too long

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 a pull request may close this issue.

2 participants