code: func (s *rpcServer) Stop() error {
  	if atomic.AddInt32(&s.shutdown, 1) != 1 {
  		rpcsLog.Infof("RPC server is already in the process of shutting down")
  		return nil
  	}
  	rpcsLog.Warnf("RPC server shutting down")
  	for _, listener := range s.cfg.Listeners {
  		err := listener.Close()
  		if err != nil {
  			rpcsLog.Errorf("Problem shutting down rpc: %v", err)
  			return err
  		}
  	}
  	s.ntfnMgr.Shutdown()
  	s.ntfnMgr.WaitForShutdown()
  	close(s.quit)
  	s.wg.Wait()
  	rpcsLog.Infof("RPC server shutdown complete")
  	return nil
  }
docs: // Stop is used by server.go to stop the rpc listener.