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
@ -372,6 +372,9 @@ func IsClosedConnError(err error) bool {
|
|||||||
if strings.Contains(str, "broken pipe") {
|
if strings.Contains(str, "broken pipe") {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
if strings.Contains(str, "connection reset by peer") {
|
||||||
|
return true
|
||||||
|
}
|
||||||
return websocket.IsCloseError(
|
return websocket.IsCloseError(
|
||||||
err, websocket.CloseNormalClosure, websocket.CloseGoingAway,
|
err, websocket.CloseNormalClosure, websocket.CloseGoingAway,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user