ws
ws copied to clipboard
MaxReaderSize for wsutil.ReadClientData
Should you add a max read limit to wsutil.ReadClientData, otherwise, it's hard to use it in production
That would be useful indeed. It's mostly about leveraging Reader.MaxFrameSize
Can it be solved with https://pkg.go.dev/io#LimitedReader ? as a param to wsutil.ReadClientData
Yes actually MaxFrameSize is not what we want here.
LimitedReader is a better candidate.
Looks like the issue is resolved, closing. Feel free to reopen, thanks.