From b030a9443554701b217aa5aff9c694fb03544350 Mon Sep 17 00:00:00 2001 From: Exclude0122 <173652916+Exclude0122@users.noreply.github.com> Date: Fri, 14 Nov 2025 20:56:23 -0500 Subject: [PATCH] Fix wireguard not discarding broken connection on android (#5304) * fix wireguard not discarding broken connection on android * simplify error checking --- proxy/wireguard/bind.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/proxy/wireguard/bind.go b/proxy/wireguard/bind.go index 79de7eba..07ec85ef 100644 --- a/proxy/wireguard/bind.go +++ b/proxy/wireguard/bind.go @@ -3,7 +3,6 @@ package wireguard import ( "context" "errors" - "io" "net" "net/netip" "strconv" @@ -153,7 +152,7 @@ func (bind *netBindClient) connectTo(endpoint *netEndpoint) error { v.endpoint = endpoint v.err = err v.waiter.Done() - if err != nil && errors.Is(err, io.EOF) { + if err != nil { endpoint.conn = nil return }