Skip to content

Commit

Permalink
Fix: incorrect mutex in speedTest (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
comzyh authored and Dreamacro committed Mar 29, 2019
1 parent 18f885a commit 531f487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adapters/outbound/urltest.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (u *URLTest) fallback() {
}

func (u *URLTest) speedTest() {
if atomic.CompareAndSwapInt32(&u.once, 0, 1) {
if !atomic.CompareAndSwapInt32(&u.once, 0, 1) {
return
}
defer atomic.StoreInt32(&u.once, 0)
Expand Down

0 comments on commit 531f487

Please sign in to comment.