Skip to content

Commit 998a53c

Browse files
committed
refactor: remove unused isConnectionReset function
1 parent 31f1cac commit 998a53c

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

server.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"io"
88
"log/slog"
99
"net"
10-
"strings"
1110
"sync"
1211
"time"
1312

@@ -176,17 +175,6 @@ func handleConnection(conn net.Conn) error {
176175
}
177176
}
178177

179-
func isConnectionReset(err error) bool {
180-
if err == nil {
181-
return false
182-
}
183-
// Check for common connection reset patterns
184-
errStr := err.Error()
185-
return strings.Contains(errStr, "connection reset by peer") ||
186-
strings.Contains(errStr, "broken pipe") ||
187-
strings.Contains(errStr, "write: broken pipe")
188-
}
189-
190178
func (s *Server) serveUDP(ctx context.Context) error {
191179
lc := net.ListenConfig{}
192180

0 commit comments

Comments
 (0)