Skip to content
Snippets Groups Projects
Commit 42f5331a authored by kr328's avatar kr328
Browse files

Fix: should close TCP/UDP endpoint on exit

parent e2383df0
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment