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

* fix wireguard not discarding broken connection on android

* simplify error checking
pull/5299/head
Exclude0122 2025-11-14 20:56:23 -05:00 committed by GitHub
parent a283c4c425
commit b030a94435
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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
}