summaryrefslogtreecommitdiffhomepage
path: root/tun_windows.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-13 19:33:41 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-13 19:34:28 +0200
commit2326d6a4d75f9f3736046cc526eb593a403d4c7a (patch)
treeda31622899bb84e256b22addd1604b8250582c44 /tun_windows.go
parente94185681f4c19874392019b0d43bdfefcbb85b5 (diff)
Odds and ends
Diffstat (limited to 'tun_windows.go')
-rw-r--r--tun_windows.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/tun_windows.go b/tun_windows.go
index c0c9ff8..6eea5a3 100644
--- a/tun_windows.go
+++ b/tun_windows.go
@@ -125,7 +125,9 @@ func (f *NativeTUN) Events() chan TUNEvent {
}
func (f *NativeTUN) Close() error {
- return windows.Close(f.fd)
+ close(f.events)
+ err := windows.Close(f.fd)
+ return err
}
func (f *NativeTUN) Write(b []byte) (int, error) {