code: func (s *RPCServer) done() {
  	s.lock.Lock()
  	defer s.lock.Unlock()
  
  	if s.DoneCh != nil {
  		close(s.DoneCh)
  		s.DoneCh = nil
  	}
  }
docs: // done is called internally by the control server to trigger the
  // doneCh to close which is listened to by the main process to cleanly
  // exit.