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
<ip>-><ip>: write: connection reset by peer" that is caused by the
client closing the connection on its end.
This commit is contained in:
Oliver Gugger 2021-04-27 15:47:31 +02:00
parent 993167f14e
commit 5e7b905f19
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

View File

@ -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,
)