diff --git a/rpc/websocket.go b/rpc/websocket.go index c7c7d70b629..ea6d12f9eb5 100644 --- a/rpc/websocket.go +++ b/rpc/websocket.go @@ -37,7 +37,7 @@ const ( wsWriteBuffer = 1024 wsPingInterval = 60 * time.Second wsPingWriteTimeout = 5 * time.Second - wsMessageSizeLimit = 15 * 1024 * 1024 + wsMessageSizeLimit = 32 * 1024 * 1024 ) var wsBufferPool = new(sync.Pool) @@ -47,7 +47,7 @@ var wsBufferPool = new(sync.Pool) // allowedOrigins should be a comma-separated list of allowed origin URLs. // To allow connections with any origin, pass "*". func (s *Server) WebsocketHandler(allowedOrigins []string, compression bool) http.Handler { - var upgrader = websocket.Upgrader{ + upgrader := websocket.Upgrader{ EnableCompression: compression, ReadBufferSize: wsReadBuffer, WriteBufferSize: wsWriteBuffer, @@ -272,7 +272,7 @@ func (wc *websocketCodec) writeJSON(ctx context.Context, v interface{}) error { // pingLoop sends periodic ping frames when the connection is idle. func (wc *websocketCodec) pingLoop() { - var timer = time.NewTimer(wsPingInterval) + timer := time.NewTimer(wsPingInterval) defer wc.wg.Done() defer timer.Stop()