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

fix: concurrent write to websocket connection panic #60

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

kooksee
Copy link
Contributor

@kooksee kooksee commented Feb 11, 2025

goroutine 680471 [running]:
github.com/gorilla/websocket.(*messageWriter).flushFrame(0xc00303d2c0, 0x1, {0xc004a5aabd?, 0x1?, 0xc00303d2f0?})
        /gocache/gomod/github.com/gorilla/[email protected]/conn.go:617 +0x4b8
github.com/gorilla/websocket.(*Conn).WriteMessage(0xc001a5e160, 0x476c073?, {0xc004a5a9b2, 0x10b, 0x164e})
        /gocache/gomod/github.com/gorilla/[email protected]/conn.go:770 +0x126
github.com/pubgo/lava/pkg/wsproxy.(*Proxy).proxy(0xc002449720, {0x555e690, 0xc003dbe680}, 0xc0018010e0)
        /gocache/gomod/github.com/pubgo/[email protected]/pkg/wsproxy/websocket_proxy.go:316 +0x11c5
github.com/pubgo/lava/pkg/wsproxy.(*Proxy).ServeHTTP(0xc002449720, {0x555e690, 0xc003dbe680}, 0xc0018010e0)
        /gocache/gomod/github.com/pubgo/[email protected]/pkg/wsproxy/websocket_proxy.go:66 +0x47
github.com/pubgo/lava/servers/grpcs.(*serviceImpl).DixInject.StripPrefix.func33({0x555e690, 0xc003dbe680}, 0xc001800fc0)
        /usr/local/go/src/net/http/server.go:2214 +0x262
net/http.HandlerFunc.ServeHTTP(0xc00141c008?, {0x555e690?, 0xc003dbe680?}, 0x18?)
        /usr/local/go/src/net/http/server.go:2171 +0x29
github.com/pubgo/lava/pkg/httputil.NewFastHTTPHandler.func1(0xc00141c008)
        /gocache/gomod/github.com/pubgo/[email protected]/pkg/httputil/fiber.go:89 +0x256
github.com/pubgo/lava/servers/grpcs.(*serviceImpl).DixInject.HTTPHandler.func34(0xc0029b4608)
        /gocache/gomod/github.com/pubgo/[email protected]/pkg/httputil/fiber.go:33 +0x3e
github.com/gofiber/fiber/v2.(*App).next(0xc001c9e008, 0xc0029b4608)
        /gocache/gomod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x1be
github.com/gofiber/fiber/v2.(*App).handler(0xc001c9e008, 0x49e2ef?)
        /gocache/gomod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x78
github.com/valyala/fasthttp.(*Server).serveConn(0xc001c98488, {0x5575930, 0xc00175b558})
        /gocache/gomod/github.com/valyala/[email protected]/server.go:2374 +0xe70
github.com/valyala/fasthttp.(*workerPool).workerFunc(0xc00259be00, 0xc0042ba2a0)
        /gocache/gomod/github.com/valyala/[email protected]/workerpool.go:224 +0xa4
github.com/valyala/fasthttp.(*workerPool).getCh.func1()
        /gocache/gomod/github.com/valyala/[email protected]/workerpool.go:196 +0x32
created by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 326
        /gocache/gomod/github.com/valyala/[email protected]/workerpool.go:195 +0x190

@kooksee kooksee changed the title fix: concurrent write to websocket connection fix: concurrent write to websocket connection panic Feb 11, 2025
@kooksee kooksee merged commit 482debd into master Feb 11, 2025
1 of 3 checks passed
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