Set read limit to unlimited (default was 32K)

This commit is contained in:
Anton Kovalenko 2024-05-13 23:23:42 +03:00
parent 0a26c22847
commit 075bee6a00

@ -173,6 +173,7 @@ func (h *Handler) LoadPeers(filename string) error {
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
wsConn, err := websocket.Accept(w, r, nil) wsConn, err := websocket.Accept(w, r, nil)
wsConn.SetReadLimit(-1)
if err != nil { if err != nil {
log.WithField("client", r.RemoteAddr).Error(err) log.WithField("client", r.RemoteAddr).Error(err)
return return