mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 21:54:13 +08:00
transport/wg: m netstack Destory shorthand for Close+Wait
Signed-off-by: ignoramous <ignoramous@users.noreply.github.com>
This commit is contained in:
parent
8f2ef67e62
commit
0c4c5cff6a
@ -235,11 +235,7 @@ func (w *StackDevice) Close() error {
|
|||||||
return os.ErrClosed
|
return os.ErrClosed
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
w.stack.Close()
|
w.stack.Destroy()
|
||||||
for _, endpoint := range w.stack.CleanupEndpoints() {
|
|
||||||
endpoint.Abort()
|
|
||||||
}
|
|
||||||
w.stack.Wait()
|
|
||||||
close(w.done)
|
close(w.done)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user