diff --git a/ssh/session_test.go b/ssh/session_test.go index df97fcf..5d6135e 100644 --- a/ssh/session_test.go +++ b/ssh/session_test.go @@ -9,6 +9,7 @@ package ssh import ( "bytes" "io" + "net" "testing" "code.google.com/p/go.crypto/ssh/terminal" @@ -45,6 +46,10 @@ func dial(handler serverType, t *testing.T) *ClientConn { if err == io.EOF { return } + // We sometimes get ECONNRESET rather than EOF. + if _, ok := err.(*net.OpError); ok { + return + } if err != nil { t.Errorf("Unable to accept incoming channel request: %v", err) return