code: func (s *Session) keepalive() {
  	for {
  		select {
  		case <-time.After(s.config.KeepAliveInterval):
  			_, err := s.Ping()
  			if err != nil {
  				if err != ErrSessionShutdown {
  					s.logger.Printf("[ERR] yamux: keepalive failed: %v", err)
  					s.exitErr(ErrKeepAliveTimeout)
  				}
  				return
  			}
  		case <-s.shutdownCh:
  			return
  		}
  	}
  }
docs: // keepalive is a long running goroutine that periodically does
  // a ping to keep the connection alive.