]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
wintun: Poll more often
authorJason A. Donenfeld <Jason@zx2c4.com>
Sun, 10 Mar 2019 02:47:54 +0000 (03:47 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sun, 10 Mar 2019 02:47:54 +0000 (03:47 +0100)
tun/wintun/wintun_windows.go

index ff334764d8dd352f3f0160c640aa69f402d69436..9fb41c4006591c06f2ffcd2a474265b147d6659b 100644 (file)
@@ -309,7 +309,7 @@ func CreateInterface(description string, hwndParent uintptr) (*Wintun, bool, err
                                if errWin, ok := err.(syscall.Errno); ok && errWin == windows.ERROR_FILE_NOT_FOUND {
                                        // Wait and retry. TODO: Wait for a cancellable event instead.
                                        err = errors.New("Time-out waiting for adapter to get ready")
-                                       time.Sleep(time.Second)
+                                       time.Sleep(time.Second / 4)
                                        continue
                                }
                        }