config+lnd: make WebSocket interval/wait configurable

To make it possible to adapt the WebSocket ping interval and pong wait
time to custom situations, we add new configuration flags to customize
them.
This commit is contained in:
Oliver Gugger
2021-04-27 15:47:34 +02:00
parent 4b685e4d64
commit 5df69cf93f
3 changed files with 15 additions and 1 deletions

2
lnd.go
View File

@@ -1266,7 +1266,7 @@ func startRestProxy(cfg *Config, rpcServer *rpcServer, restDialOpts []grpc.DialO
// Wrap the default grpc-gateway handler with the WebSocket handler.
restHandler := lnrpc.NewWebSocketProxy(
mux, rpcsLog, lnrpc.DefaultPingInterval, lnrpc.DefaultPongWait,
mux, rpcsLog, cfg.WSPingInterval, cfg.WSPongWait,
lnrpc.LndClientStreamingURIs,
)