Set read limit to unlimited (default was 32K)
This commit is contained in:
parent
0a26c22847
commit
075bee6a00
1
main.go
1
main.go
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user