wgengine/netstack: close ipstack when netstack.Impl is closed

Fixes netstack.Impl leaking goroutines after shutdown.

Signed-off-by: kylecarbs <kyle@carberry.com>
pull/4963/head
kylecarbs 2022-06-28 17:28:19 +00:00 committed by Brad Fitzpatrick
parent d7f452c0a1
commit 9280d39678
1 changed files with 1 additions and 0 deletions

View File

@ -201,6 +201,7 @@ func Create(logf logger.Logf, tundev *tstun.Wrapper, e wgengine.Engine, mc *magi
func (ns *Impl) Close() error {
ns.ctxCancel()
ns.ipstack.Close()
return nil
}