code: func (rm *retrieveManager) sendReq(reqID uint64, req *distReq, val validatorFunc) *sentReq {
  	r := &sentReq{
  		rm:       rm,
  		req:      req,
  		id:       reqID,
  		sentTo:   make(map[distPeer]sentReqToPeer),
  		stopCh:   make(chan struct{}),
  		eventsCh: make(chan reqPeerEvent, 10),
  		validate: val,
  	}
  
  	canSend := req.canSend
  	req.canSend = func(p distPeer) bool {
  		// add an extra check to canSend: the request has not been sent to the same peer before
  		r.lock.RLock()
  		_, sent := r.sentTo[p]
  		r.lock.RUnlock()
  		return !sent && canSend(p)
  	}
  
  	request := req.request
  	req.request = func(p distPeer) func() {
  		// before actually sending the request, put an entry into the sentTo map
  		r.lock.Lock()
  		r.sentTo[p] = sentReqToPeer{false, make(chan bool, 1)}
  		r.lock.Unlock()
  		return request(p)
  	}
  	rm.lock.Lock()
  	rm.sentReqs[reqID] = r
  	rm.lock.Unlock()
  
  	go r.retrieveLoop()
  	return r
  }
docs: // sendReq starts a process that keeps trying to retrieve a valid answer for a
  // request from any suitable peers until stopped or succeeded.