fix: close mixed stack panic #1014

This commit is contained in:
wwqgtxx 2024-04-03 23:41:04 +08:00
parent 40f5c5b987
commit b56e73a02a

View File

@ -261,15 +261,17 @@ func New(options LC.Tun, tunnel C.Tunnel, additions ...inbound.Addition) (l *Lis
}
}
l.tunIf = tunIf
l.tunStack, err = tun.NewStack(strings.ToLower(options.Stack.String()), stackOptions)
tunStack, err := tun.NewStack(strings.ToLower(options.Stack.String()), stackOptions)
if err != nil {
return
}
err = l.tunStack.Start()
err = tunStack.Start()
if err != nil {
return
}
l.tunStack = tunStack
//l.openAndroidHotspot(tunOptions)