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

websocket packet size over 1024 causing read hang #179

Closed
fikersd opened this issue Oct 28, 2022 · 1 comment
Closed

websocket packet size over 1024 causing read hang #179

fikersd opened this issue Oct 28, 2022 · 1 comment

Comments

@fikersd
Copy link

fikersd commented Oct 28, 2022

websocket connection reader implemention will cause read hang

file: server/server.go
line: 1041

func (ws *wsConn) Read(p []byte) (n int, err error) {
	msgType, r, err := ws.c.NextReader()
	if err != nil {
		return 0, err
	}
	if msgType != websocket.BinaryMessage {
		return 0, ErrInvalWsMsgType
	}
	return r.Read(p)
}

ws.cNextReader() will close the reader

@DrmagicE
Copy link
Owner

Fixed by #181
Thank you for your contribution.

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

No branches or pull requests

2 participants