diff --git a/transport/wireguard/device_stack.go b/transport/wireguard/device_stack.go index 21599305..f009ca0c 100644 --- a/transport/wireguard/device_stack.go +++ b/transport/wireguard/device_stack.go @@ -235,11 +235,7 @@ func (w *StackDevice) Close() error { return os.ErrClosed default: } - w.stack.Close() - for _, endpoint := range w.stack.CleanupEndpoints() { - endpoint.Abort() - } - w.stack.Wait() + w.stack.Destroy() close(w.done) return nil }