WireGuard outbound: Fix close closed (#5054)

Fixes https://github.com/XTLS/Xray-core/issues/5053
pull/5065/head^2
风扇滑翔翼 2025-08-27 17:33:09 +08:00 committed by GitHub
parent 2ee372e758
commit 5fa5f3fbb9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

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