Merge pull request #5237 from guggero/ws-bi-di

REST: Enable support for bi-directional streaming RPCs over REST, fix ping/pong support
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2021-04-29 15:55:00 -07:00
commit 98b0b34bb4
11 files changed
+833 -204

No files matched your search

+4 -1
View File
@@ -1272,7 +1272,10 @@ func startRestProxy(cfg *Config, rpcServer *rpcServer, restDialOpts []grpc.DialO
}
// Wrap the default grpc-gateway handler with the WebSocket handler.
restHandler := lnrpc.NewWebSocketProxy(mux, rpcsLog)
restHandler := lnrpc.NewWebSocketProxy(
mux, rpcsLog, cfg.WSPingInterval, cfg.WSPongWait,
lnrpc.LndClientStreamingURIs,
)
// Use a WaitGroup so we can be sure the instructions on how to input the
// password is the last thing to be printed to the console.