Skip to content

Commit b56e73a

Browse files
committed
fix: close mixed stack panic #1014
1 parent 40f5c5b commit b56e73a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

listener/sing_tun/server.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -261,15 +261,17 @@ func New(options LC.Tun, tunnel C.Tunnel, additions ...inbound.Addition) (l *Lis
261261
}
262262
}
263263
l.tunIf = tunIf
264-
l.tunStack, err = tun.NewStack(strings.ToLower(options.Stack.String()), stackOptions)
264+
265+
tunStack, err := tun.NewStack(strings.ToLower(options.Stack.String()), stackOptions)
265266
if err != nil {
266267
return
267268
}
268269

269-
err = l.tunStack.Start()
270+
err = tunStack.Start()
270271
if err != nil {
271272
return
272273
}
274+
l.tunStack = tunStack
273275

274276
//l.openAndroidHotspot(tunOptions)
275277

0 commit comments

Comments
 (0)