浏览代码

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>
Han-Wen Nienhuys 9 年之前
父节点
当前提交
bc89c49641
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      ssh/channel.go

+ 2 - 0
ssh/channel.go

@@ -67,6 +67,8 @@ type Channel interface {
 	// boolean, otherwise the return value will be false. Channel
 	// boolean, otherwise the return value will be false. Channel
 	// requests are out-of-band messages so they may be sent even
 	// requests are out-of-band messages so they may be sent even
 	// if the data stream is closed or blocked by flow control.
 	// if the data stream is closed or blocked by flow control.
+	// If the channel is closed before a reply is returned, io.EOF
+	// is returned.
 	SendRequest(name string, wantReply bool, payload []byte) (bool, error)
 	SendRequest(name string, wantReply bool, payload []byte) (bool, error)
 
 
 	// Stderr returns an io.ReadWriter that writes to this channel
 	// Stderr returns an io.ReadWriter that writes to this channel