code: func (s *MockCCComm) Run(done <-chan struct{}) error {
  	//start the keepalive
  	go s.ka(done)
  	defer s.Quit()
  
  	for {
  		msg, err := s.Recv()
  
  		//stream could just be closed
  		if msg == nil {
  			return err
  		}
  
  		if err != nil {
  			return err
  		}
  
  		if err = s.respond(msg); err != nil {
  			if s.bailOnError {
  				return err
  			}
  		}
  	}
  }
docs: //Run receives and sends indefinitely