diff --git a/ssh/client_auth_test.go b/ssh/client_auth_test.go index a726595..f2fc9c6 100644 --- a/ssh/client_auth_test.go +++ b/ssh/client_auth_test.go @@ -361,6 +361,8 @@ func TestClientUnsupportedKex(t *testing.T) { c, err := Dial("tcp", newMockAuthServer(t), config) if err == nil || !strings.Contains(err.Error(), "no common algorithms") { t.Errorf("got %v, expected 'no common algorithms'", err) + } + if c != nil { c.Close() } }