Commit 004923d8 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

go.crypto/ssh: only close connection if it was open in TestClientUnsupportedKex.

R=dave
CC=golang-dev
https://codereview.appspot.com/15450046

Committer: Dave Cheney <dave@cheney.net>
parent 553935a7
......@@ -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()
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment