diff options
| author | Dave Cheney <dave@cheney.net> | 2012-08-18 15:41:45 +1000 |
|---|---|---|
| committer | Dave Cheney <dave@cheney.net> | 2012-08-18 15:41:45 +1000 |
| commit | 096d0eae018b8e5d55a109ed511d21612c436cd6 (patch) | |
| tree | 95efc30827f31efe978b5817e90aacab0c73e8dd /ssh/client_auth_test.go | |
| parent | 7343d5f5849484ec61fca3e4a0e6c529e400aaa9 (diff) | |
| download | go-x-crypto-096d0eae018b8e5d55a109ed511d21612c436cd6.tar.xz | |
go.crypto/ssh: fix misplaced defer
Fixes golang/go#3972.
R=golang-dev, agl, r
CC=golang-dev
https://golang.org/cl/6448166
Diffstat (limited to 'ssh/client_auth_test.go')
| -rw-r--r-- | ssh/client_auth_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssh/client_auth_test.go b/ssh/client_auth_test.go index 9d1ae2f..11c7227 100644 --- a/ssh/client_auth_test.go +++ b/ssh/client_auth_test.go @@ -160,7 +160,6 @@ func newMockAuthServer(t *testing.T) string { go func() { defer l.Close() c, err := l.Accept() - defer c.Close() if err != nil { t.Errorf("Unable to accept incoming connection: %v", err) return @@ -171,6 +170,7 @@ func newMockAuthServer(t *testing.T) string { t.Logf("Handshaking error: %v", err) return } + defer c.Close() }() return l.Addr().String() } |
