diff --git a/ethstats/ethstats.go b/ethstats/ethstats.go index f6ad36051..e059844a1 100644 --- a/ethstats/ethstats.go +++ b/ethstats/ethstats.go @@ -57,6 +57,8 @@ const ( txChanSize = 4096 // chainHeadChanSize is the size of channel listening to ChainHeadEvent. chainHeadChanSize = 10 + + messageSizeLimit = 15 * 1024 * 1024 ) // backend encompasses the bare-minimum functionality needed for ethstats reporting @@ -121,6 +123,7 @@ type connWrapper struct { } func newConnectionWrapper(conn *websocket.Conn) *connWrapper { + conn.SetReadLimit(messageSizeLimit) return &connWrapper{conn: conn} }