]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
tun: windows: Fix paused adapter test
authorSimon Rozman <simon@rozman.si>
Fri, 22 Mar 2019 11:40:13 +0000 (12:40 +0100)
committerSimon Rozman <simon@rozman.si>
Fri, 22 Mar 2019 12:52:51 +0000 (13:52 +0100)
Signed-off-by: Simon Rozman <simon@rozman.si>
tun/tun_windows.go

index ea244f111a21f24eac5a9f627fd7eb6fbf2c7723..ce6ec8c9710206572862839fdc55b87f1b3ab3ee 100644 (file)
@@ -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