diff --git a/tun/tun_darwin.go b/tun/tun_darwin.go index 0815495..6d2e6dd 100644 --- a/tun/tun_darwin.go +++ b/tun/tun_darwin.go @@ -48,10 +48,7 @@ func (tun *NativeTun) routineRouteListener(tunIfindex int) { statusMTU int ) - defer func() { - close(tun.events) - tun.routeSocket = -1 - }() + defer close(tun.events) data := make([]byte, os.Getpagesize()) for {