Commit 503568b0 authored by rui.zheng's avatar rui.zheng

fix SSH ping timeout

parent 7ce6fa53
......@@ -279,10 +279,12 @@ func (s *sshSession) Ping(interval time.Duration, retries int) {
func (s *sshSession) sendPing() <-chan error {
ch := make(chan error, 1)
go func() {
if _, _, err := s.client.SendRequest("ping", true, nil); err != nil {
ch <- err
}
close(ch)
}()
return ch
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment