code: func (c *cmd) renewSession(id string, stopCh chan struct{}) {
  	session := c.apiclient.Session()
  	for {
  		select {
  		case <-time.After(rExecRenewInterval):
  			_, _, err := session.Renew(id, nil)
  			if err != nil {
  				c.UI.Error(fmt.Sprintf("Session renew failed: %v", err))
  				return
  			}
  		case <-stopCh:
  			return
  		}
  	}
  }
docs: // renewSession is a long running routine that periodically renews
  // the session TTL. This is used for foreign sessions where we depend
  // on TTLs.