mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2024-11-16 15:42:17 +08:00
Fix: should close TCP/UDP endpoint on exit
This commit is contained in:
parent
e2383df06b
commit
42f5331a0c
|
@ -72,6 +72,8 @@ func Start(fd, mtu int, dns string) error {
|
|||
go func() {
|
||||
// lwip tcp
|
||||
|
||||
defer stack.TCP().Close()
|
||||
|
||||
for {
|
||||
conn, err := stack.TCP().Accept()
|
||||
if err != nil {
|
||||
|
@ -94,6 +96,8 @@ func Start(fd, mtu int, dns string) error {
|
|||
go func() {
|
||||
// lwip udp
|
||||
|
||||
defer stack.UDP().Close()
|
||||
|
||||
for {
|
||||
buf := allocUDP(mtu)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user