Fix: incorrect mutex in speedTest (#153)
This commit is contained in:
parent
b26e6c5a59
commit
fd3734bc4a
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ func (u *URLTest) fallback() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *URLTest) speedTest() {
|
func (u *URLTest) speedTest() {
|
||||||
if atomic.CompareAndSwapInt32(&u.once, 0, 1) {
|
if !atomic.CompareAndSwapInt32(&u.once, 0, 1) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer atomic.StoreInt32(&u.once, 0)
|
defer atomic.StoreInt32(&u.once, 0)
|
||||||
|
|
Loading…
Reference in a new issue