diff --git a/proxy/wireguard/client.go b/proxy/wireguard/client.go index 345581c7..9de24360 100644 --- a/proxy/wireguard/client.go +++ b/proxy/wireguard/client.go @@ -129,7 +129,8 @@ func (h *Handler) processWireGuard(ctx context.Context, dialer internet.Dialer) } defer func() { if err != nil { - _ = h.bind.Close() + h.bind.Close() + h.bind = nil } }()