Closed PolygonError closed 4 years ago
Is this behavior consistent if you try logging in multiple times/refreshing the page on /chat/
?
Is this behavior consistent if you try logging in multiple times/refreshing the page on
/chat/
?
Yes, refreshing /chat/
causes a consistent runtime error.
https://github.com/nektro/mantle/blob/master/pkg/ws/ws.go#L23
conn, _ := reqUpgrader.Upgrade(w, r, nil)
its crashing because for some reason the websocket request upgrader is failing and the resulting conn value is null. but i wasnt handling this error yet so it stores the value anyway. then shortly after when it goes to send the broadcast message that your user is now connected, the connection value is still null and trying to read a property off of null is what causes the panic
Yep, caused by Apache reverse proxy not passing web socket data correctly. Cheers.
User joined and mantle crashed immediately with the following go version: go version go1.14 linux/amd64 go env: