rpc: backport experimental buffer size control parameters from #7230 (tm v0.35.x) (#7276)

* Update error message to correspond to changes in v0.34.x
* Add buffer size and client-close config parameters

Signed-off-by: Thane Thomson <connect@thanethomson.com>
This commit is contained in:
Thane Thomson
2021-11-13 16:48:45 -05:00
committed by GitHub
parent 37e0779d6d
commit 035da42a91
6 changed files with 86 additions and 5 deletions

View File

@@ -889,6 +889,7 @@ func (n *nodeImpl) startRPC() ([]net.Listener, error) {
}
}),
rpcserver.ReadLimit(cfg.MaxBodyBytes),
rpcserver.WriteChanCapacity(n.config.RPC.WebSocketWriteBufferSize),
)
wm.SetLogger(wmLogger)
mux.HandleFunc("/websocket", wm.WebsocketHandler)