1
0
mirror of https://github.com/taigrr/go-fastping synced 2025-01-18 05:03:15 -08:00

Use defer when it calls Mutex Unlock

This commit is contained in:
Tatsushi Demachi 2014-04-21 22:50:00 +09:00
parent 7224648946
commit 4b49bd943e

View File

@ -152,13 +152,13 @@ func TestMultiRun(t *testing.T) {
break
}
mu.Lock()
defer mu.Unlock()
if res1 != 1 {
t.Fatalf("Pinger 1 didn't get correct response")
}
if res2 != 1 {
t.Fatalf("Pinger 2 didn't get correct response")
}
mu.Unlock()
}
func TestRunLoop(t *testing.T) {