mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-06 17:47:01 +02:00
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:
@@ -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,
|
||||
)
|
||||
|
Reference in New Issue
Block a user