code: def _do_leave(self, leave, in_port, msg):
          
          datapath = msg.datapath
          parser = datapath.ofproto_parser
  
          self._mcast.setdefault(leave.address, {})
          if in_port in self._mcast[leave.address]:
              self._del_flow_entry(
                  datapath, in_port, leave.address)
              del self._mcast[leave.address][in_port]
              actions = []
              for port in self._mcast[leave.address]:
                  actions.append(parser.OFPActionOutput(port))
              if len(actions):
                  self._set_flow_entry(
                      datapath, actions, self.server_port, leave.address)
              else:
                  self._del_flow_entry(
                      datapath, self.server_port, leave.address)
docs: the process when the querier received a LEAVE message.