aboutsummaryrefslogtreecommitdiffstats
path: root/tun_darwin.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tun_darwin.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/tun_darwin.go b/tun_darwin.go
index 1d66c66..fa8efe0 100644
--- a/tun_darwin.go
+++ b/tun_darwin.go
@@ -224,7 +224,9 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) {
}
func (tun *NativeTun) Close() error {
- return tun.fd.Close()
+ err := tun.fd.Close()
+ close(tun.events)
+ return err
}
func (tun *NativeTun) setMTU(n int) error {