wintun: don't retry when not creating
The only time we're trying to counteract the race condition is when we're creating a driver. When we're simply looking up all drivers, it doesn't make sense to retry.
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
numRetries = 100
|
||||
numRetries = 100
|
||||
retryTimeout = 150 * time.Millisecond
|
||||
)
|
||||
|
||||
@@ -21,7 +21,7 @@ func registryOpenKeyRetry(k registry.Key, path string, access uint32) (key regis
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
if i != numRetries - 1 {
|
||||
if i != numRetries-1 {
|
||||
time.Sleep(retryTimeout)
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ func keyGetStringValueRetry(k registry.Key, name string) (val string, valtype ui
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
if i != numRetries - 1 {
|
||||
if i != numRetries-1 {
|
||||
time.Sleep(retryTimeout)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user