code: func (s *Server) handleConsulConn(conn net.Conn) {
  	defer conn.Close()
  	rpcCodec := msgpackrpc.NewServerCodec(conn)
  	for {
  		select {
  		case <-s.shutdownCh:
  			return
  		default:
  		}
  
  		if err := s.rpcServer.ServeRequest(rpcCodec); err != nil {
  			if err != io.EOF && !strings.Contains(err.Error(), "closed") {
  				s.logger.Printf("[ERR] consul.rpc: RPC error: %v %s", err, logConn(conn))
  				metrics.IncrCounter([]string{"rpc", "request_error"}, 1)
  			}
  			return
  		}
  		metrics.IncrCounter([]string{"rpc", "request"}, 1)
  	}
  }
docs: // handleConsulConn is used to service a single Consul RPC connection