Skip to content

Commit bc89c49

Browse files
committed
ssh: clarify error type if a SendRequest goes unanswered
This came up in the discussion of issue #16194. Change-Id: Ibb4cadf3be975377819eca2e41e0992794ada77b Reviewed-on: https://go-review.googlesource.com/24820 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Han-Wen Nienhuys <hanwen@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
1 parent 911fafb commit bc89c49

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ssh/channel.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ type Channel interface {
6767
// boolean, otherwise the return value will be false. Channel
6868
// requests are out-of-band messages so they may be sent even
6969
// if the data stream is closed or blocked by flow control.
70+
// If the channel is closed before a reply is returned, io.EOF
71+
// is returned.
7072
SendRequest(name string, wantReply bool, payload []byte) (bool, error)
7173

7274
// Stderr returns an io.ReadWriter that writes to this channel

0 commit comments

Comments
 (0)