Skip to content

Commit

Permalink
fix close mixed stack panic
Browse files Browse the repository at this point in the history
  • Loading branch information
wwqgtxx committed Apr 3, 2024
1 parent dc0585e commit 1d711d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions listener/sing_tun/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,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)

Expand Down

0 comments on commit 1d711d8

Please sign in to comment.