diff --git a/fastping_test.go b/fastping_test.go index 12d17ce..52e58d5 100644 --- a/fastping_test.go +++ b/fastping_test.go @@ -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) {