From 2326d6a4d75f9f3736046cc526eb593a403d4c7a Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 13 May 2018 19:33:41 +0200 Subject: Odds and ends --- tun_darwin.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tun_darwin.go') 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 { -- cgit v1.2.3-59-g8ed1b