MCPcopy
hub / github.com/cloudfoundry/cli / keepalive

Function keepalive

util/clissh/ssh.go:399–412  ·  view source on GitHub ↗
(conn ssh.Conn, ticker *time.Ticker, stopCh chan struct{})

Source from the content-addressed store, hash-verified

397}
398
399func keepalive(conn ssh.Conn, ticker *time.Ticker, stopCh chan struct{}) {
400 for {
401 select {
402 case <-ticker.C:
403 _, _, err := conn.SendRequest("keepalive@cloudfoundry.org", true, nil)
404 if err != nil {
405 log.Errorln("err sending keep alive:", err)
406 }
407 case <-stopCh:
408 ticker.Stop()
409 return
410 }
411 }
412}
413
414func md5Fingerprint(key ssh.PublicKey) string {
415 sum := md5.Sum(key.Marshal())

Callers 2

InteractiveSessionMethod · 0.70
WaitMethod · 0.70

Calls 2

SendRequestMethod · 0.65
StopMethod · 0.65

Tested by

no test coverage detected