From 0c4c5cff6aa09bb25ab54a76e3d31e234b75a321 Mon Sep 17 00:00:00 2001 From: ignoramous Date: Fri, 29 Sep 2023 11:37:13 +0530 Subject: [PATCH] transport/wg: m netstack Destory shorthand for Close+Wait Signed-off-by: ignoramous --- transport/wireguard/device_stack.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 }