File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ const (
2020 DefaultSSHPort = 10022
2121)
2222
23+ // writeTimeoutConn is a net.Conn that sets the write timeout on every call to Write()
2324type writeTimeoutConn struct {
2425 net.Conn
2526 timeout time.Duration
@@ -41,6 +42,7 @@ type legacyConnection struct {
4142}
4243
4344// Connect connects to the address with the given timeout.
45+ // The timeout is used as dial and write timeout.
4446func (c * legacyConnection ) Connect (addr string , timeout time.Duration ) error {
4547 addr , err := verifyAddr (addr , DefaultPort )
4648 if err != nil {
@@ -68,6 +70,7 @@ type sshConnection struct {
6870}
6971
7072// Connect connects to the address with the given timeout and opens a new SSH channel with attached shell.
73+ // The timeout is used as dial and write timeout.
7174func (c * sshConnection ) Connect (addr string , timeout time.Duration ) error {
7275 addr , err := verifyAddr (addr , DefaultSSHPort )
7376 if err != nil {
You can’t perform that action at this time.
0 commit comments