Skip to content

Commit

Permalink
fix: close mixed stack panic #1014
Browse files Browse the repository at this point in the history
  • Loading branch information
wwqgtxx committed Apr 3, 2024
1 parent 40f5c5b commit a4804eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion listener/sing_tun/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ 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
}
Expand All @@ -270,6 +271,7 @@ func New(options LC.Tun, tunnel C.Tunnel, additions ...inbound.Addition) (l *Lis
if err != nil {
return
}
l.tunStack = tunStack

//l.openAndroidHotspot(tunOptions)

Expand Down

0 comments on commit a4804eb

Please sign in to comment.