Fix issues reported by staticcheck

This commit is contained in:
Julien Laffaye
2020-10-21 22:10:46 +02:00
parent 333201f85f
commit 0de5c29d45
3 changed files with 4 additions and 4 deletions

View File

@@ -228,10 +228,9 @@ func TestTimeout(t *testing.T) {
t.Skip("skipping test in short mode.")
}
c, err := DialTimeout("localhost:2121", 1*time.Second)
if err == nil {
t.Fatal("expected timeout, got nil error")
if c, err := DialTimeout("localhost:2121", 1*time.Second); err == nil {
c.Quit()
t.Fatal("expected timeout, got nil error")
}
}