code: func (a *Agent) handleDiscovery(ch ssh.Channel, reqC <-chan *ssh.Request) {
  	a.Debugf("handleDiscovery")
  	defer ch.Close()
  
  	for {
  		var req *ssh.Request
  		select {
  		case <-a.ctx.Done():
  			a.Infof("is closed, returning")
  			return
  		case req = <-reqC:
  			if req == nil {
  				a.Infof("connection closed, returning")
  				return
  			}
  			r, err := unmarshalDiscoveryRequest(req.Payload)
  			if err != nil {
  				a.Warningf("bad payload: %v", err)
  				return
  			}
  			r.ClusterAddr = a.Addr
  			select {
  			case a.DiscoveryC <- r:
  			case <-a.ctx.Done():
  				a.Infof("is closed, returning")
  				return
  			default:
  			}
  		}
  	}
  }
docs: // handleDisovery receives discovery requests from the reverse tunnel
  // server, that informs agent about proxies registered in the remote
  // cluster and the reverse tunnels already established
  //
  // ch   : SSH channel which received "teleport-transport" out-of-band request
  // reqC : request payload