wintun: Poll more often

This commit is contained in:
Jason A. Donenfeld 2019-03-10 03:47:54 +01:00
parent 3dd9a0535f
commit 66fb5caf02

View 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 { if errWin, ok := err.(syscall.Errno); ok && errWin == windows.ERROR_FILE_NOT_FOUND {
// Wait and retry. TODO: Wait for a cancellable event instead. // Wait and retry. TODO: Wait for a cancellable event instead.
err = errors.New("Time-out waiting for adapter to get ready") err = errors.New("Time-out waiting for adapter to get ready")
time.Sleep(time.Second) time.Sleep(time.Second / 4)
continue continue
} }
} }