From 5e7b905f19f75fa61ef22711df7331f4d6ae4244 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 27 Apr 2021 15:47:31 +0200 Subject: [PATCH] lnrpc: fix WS close error Fixes the logged error "WS: error closing upgraded conn: tls: failed to send closeNotify alert (but connection was closed anyway): write tcp4 ->: write: connection reset by peer" that is caused by the client closing the connection on its end. --- lnrpc/websocket_proxy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lnrpc/websocket_proxy.go b/lnrpc/websocket_proxy.go index 9079fc5f..fb43b923 100644 --- a/lnrpc/websocket_proxy.go +++ b/lnrpc/websocket_proxy.go @@ -372,6 +372,9 @@ func IsClosedConnError(err error) bool { if strings.Contains(str, "broken pipe") { return true } + if strings.Contains(str, "connection reset by peer") { + return true + } return websocket.IsCloseError( err, websocket.CloseNormalClosure, websocket.CloseGoingAway, )