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
|
||||
default:
|
||||
}
|
||||
w.stack.Close()
|
||||
for _, endpoint := range w.stack.CleanupEndpoints() {
|
||||
endpoint.Abort()
|
||||
}
|
||||
w.stack.Wait()
|
||||
w.stack.Destroy()
|
||||
close(w.done)
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user