Skip to content

Commit 16bbb8a

Browse files
Ignore "connection reset by peer" errors on the websocket
There isn't anything we can do about those.
1 parent 2000130 commit 16bbb8a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/signaling/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func Handler(ctx context.Context, store stores.Store, cloudflare *cloudflare.Cre
134134
case <-ticker.C:
135135
if err := peer.Send(ctx, PingPacket{Type: "ping"}); err != nil {
136136
if !util.ShouldIgnoreNetworkError(err) {
137-
if strings.Contains(err.Error(), "write: broken pipe") {
137+
if strings.Contains(err.Error(), "write: broken pipe") || strings.Contains(err.Error(), "connection reset by peer") {
138138
logger.Warn("failed to send ping packet", zap.String("peer", peer.ID), zap.Error(err))
139139
} else {
140140
logger.Error("failed to send ping packet", zap.String("peer", peer.ID), zap.Error(err))

0 commit comments

Comments
 (0)