1
mirror of https://github.com/XTLS/Xray-core.git synced 2025-12-12 12:42:26 +04:00

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

Fixes https://github.com/XTLS/Xray-core/issues/5303
This commit is contained in:
Exclude0122
2025-11-14 20:56:23 -05:00
committed by RPRX
parent 1a32d18c16
commit 18a4104737

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
}