Browse Source

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

Fixes netstack.Impl leaking goroutines after shutdown.

Signed-off-by: kylecarbs <[email protected]>
kylecarbs 3 years ago
parent
commit
9280d39678
1 changed files with 1 additions and 0 deletions
  1. 1 0
      wgengine/netstack/netstack.go

+ 1 - 0
wgengine/netstack/netstack.go

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