Skip to content

Commit

Permalink
Filter out expected errors (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
boks1971 authored Nov 20, 2023
1 parent 65f60f3 commit f47acba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion signalclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,10 @@ func (c *SignalClient) websocketConn() *websocket.Conn {
}

func isIgnoredWebsocketError(err error) bool {
if err == nil || err == io.EOF {
if err == nil ||
err == io.EOF ||
strings.Contains(err.Error(), "use of closed network connection") ||
strings.Contains(err.Error(), "connection reset by peer") {
return true
}

Expand Down

0 comments on commit f47acba

Please sign in to comment.