From: Simon Rozman Date: Fri, 22 Mar 2019 11:40:13 +0000 (+0100) Subject: tun: windows: Fix paused adapter test X-Git-Tag: 0.0.20190409~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9748a52073e247ece6110cf43f036beb940c80e4;p=thirdparty%2Fwireguard-go.git tun: windows: Fix paused adapter test Signed-off-by: Simon Rozman --- 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