lnd+lnrpc: enable WebSocket ping/pong messages

Fixes #4497 by sending out ping messages in a regular interval to make
sure the connection is still alive.
This commit is contained in:
Oliver Gugger committed 2021-04-29 10:39:50 +02:00
1 parent 5e7b905f19
commit 4b685e4d64
2 files changed
+82 -2

No files matched your search

+2 -1
View File
@@ -1266,7 +1266,8 @@ 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.LndClientStreamingURIs,
mux, rpcsLog, lnrpc.DefaultPingInterval, lnrpc.DefaultPongWait,
lnrpc.LndClientStreamingURIs,
)
// Use a WaitGroup so we can be sure the instructions on how to input the