Remote connection failure should not effect host connection (Returning error will trigger the termination of the host connection)

This commit is contained in:
NI
2019-08-12 12:19:30 +08:00
parent 8d0ac9f559
commit d4c297e9ca
2 changed files with 6 additions and 2 deletions

View File

@@ -524,8 +524,10 @@ func (d *sshClient) local(
_, wErr := remote.writer.Write(rData) _, wErr := remote.writer.Write(rData)
if wErr != nil { if wErr != nil {
return wErr d.l.Debug("Failed to write data to remote: %s", wErr)
} }
return nil
} }
return nil return nil

View File

@@ -180,8 +180,10 @@ func (d *telnetClient) client(
_, wErr := remoteConn.Write(rBuf) _, wErr := remoteConn.Write(rBuf)
if wErr != nil { if wErr != nil {
return wErr d.l.Debug("Failed to write data to remote: %s", wErr)
} }
return nil
} }
return nil return nil