From 655bca0ecbb45d1a61f50a4690f5a0be4bfdb309 Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Fri, 21 Jan 2022 13:30:56 +0200 Subject: [PATCH] aperture: disable websocket proxy pings for hashmail server Set the ping and pong intervals of the websocket proxy to zero in order to disable them. This is needed since a browser client is unable to respond to these pings. --- aperture.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/aperture.go b/aperture.go index 566bbea..8c8be6a 100644 --- a/aperture.go +++ b/aperture.go @@ -689,8 +689,7 @@ func createHashMailServer(cfg *Config) ([]proxy.LocalService, func(), error) { // collector will export latency metrics for the histogram. grpc_prometheus.EnableHandlingTimeHistogram() - var serverOpts []grpc.ServerOption - serverOpts = []grpc.ServerOption{ + serverOpts := []grpc.ServerOption{ grpc.ChainUnaryInterceptor( grpc_prometheus.UnaryServerInterceptor, ), @@ -750,8 +749,7 @@ func createHashMailServer(cfg *Config) ([]proxy.LocalService, func(), error) { // Wrap the default grpc-gateway handler with the WebSocket handler. restHandler := lnrpc.NewWebSocketProxy( - mux, log, time.Second*30, time.Second*5, - clientStreamingURIs, + mux, log, 0, 0, clientStreamingURIs, ) // Create our proxy chain now. A request will pass