aboutsummaryrefslogtreecommitdiffstats
path: root/tun
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-03-22 12:40:13 +0100
committerSimon Rozman <simon@rozman.si>2019-03-22 13:52:51 +0100
commit9748a52073e247ece6110cf43f036beb940c80e4 (patch)
treeb750b995c710c360745cfd290494a5eb8e516715 /tun
parenttun: windows: just open two file handles (diff)
downloadwireguard-go-9748a52073e247ece6110cf43f036beb940c80e4.tar.xz
wireguard-go-9748a52073e247ece6110cf43f036beb940c80e4.zip
tun: windows: Fix paused adapter test
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'tun')
-rw-r--r--tun/tun_windows.go2
1 files changed, 1 insertions, 1 deletions
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