mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 14:11:04 +02:00
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:
3
lnd.go
3
lnd.go
@@ -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
|
||||
|
Reference in New Issue
Block a user