From eb2c86bc7bb106dc42dce591c76f2a5dd7a74d47 Mon Sep 17 00:00:00 2001 From: seasar Date: Mon, 23 Nov 2020 18:13:30 +0800 Subject: [PATCH] fix return value of handshakeTransport.writePacket() when t.pushPacket(p) returns an error, writePacket() should return the error other than nil. --- ssh/handshake.go | 1 + 1 file changed, 1 insertion(+) diff --git a/ssh/handshake.go b/ssh/handshake.go index 2b10b05a49..1db34b5e4b 100644 --- a/ssh/handshake.go +++ b/ssh/handshake.go @@ -515,6 +515,7 @@ func (t *handshakeTransport) writePacket(p []byte) error { if err := t.pushPacket(p); err != nil { t.writeError = err + return err } return nil