Fix wireguard not discarding broken connection on android (#5304)

Fixes https://github.com/XTLS/Xray-core/issues/5303
pull/5252/merge
Exclude0122 2025-11-14 20:56:23 -05:00 committed by RPRX
parent 1a32d18c16
commit 18a4104737
1 changed files with 1 additions and 2 deletions

View File

@ -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
}