From 9748a52073e247ece6110cf43f036beb940c80e4 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Fri, 22 Mar 2019 12:40:13 +0100 Subject: tun: windows: Fix paused adapter test Signed-off-by: Simon Rozman --- tun/tun_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tun/tun_windows.go b/tun/tun_windows.go index ea244f1..ce6ec8c 100644 --- a/tun/tun_windows.go +++ b/tun/tun_windows.go @@ -187,7 +187,7 @@ func (tun *NativeTun) getTUN() (read *os.File, write *os.File, err error) { } func (tun *NativeTun) shouldReopenHandle(err error) bool { - if pe, ok := err.(*os.PathError); ok && pe.Err == os.ErrClosed { + if pe, ok := err.(*os.PathError); ok && pe.Err == windows.ERROR_OPERATION_ABORTED { return !tun.close } return false -- cgit v1.2.3