mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-26 08:55:59 +01: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:
parent
993167f14e
commit
5e7b905f19
1 changed files with 3 additions and 0 deletions
|
@ -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,
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue