x/crypto/ssh: write errors should be returned immediately #57531
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Apologies if this is a duplicate or not actually a bug.
What version of Go are you using (
go version
)?x/crypto master
Does this issue reproduce with the latest release?
Yes, this behavior hasn't changed since it was introduced in golang/crypto@2e74c77 .
What did you do?
Write to a channel of an SSH connection that's interrupted, e.g. by receiving a TCP RST.
What did you expect to see?
A write error is reported as soon as writing to the underlying net.Conn fails.
What did you see instead?
The error is reported only on subsequent writes. This is not a dire problem, but seems odd/unnecessary.
In particular,
handshakeTransport.writePacket
setst.writeError
but returnsnil
. This seems to have been introduced in the aforelinked golang/crypto@2e74c77 .Is there a missing
return err
here? If so, I can submit a CL.The text was updated successfully, but these errors were encountered: