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