code: func (ed *Dispatcher) clearChaincodeRegistrations(closeChannel bool) {
  	if closeChannel {
  		for _, reg := range ed.ccRegistrations {
  			logger.Debugf("Closing chaincode registration event channel for CC ID [%s] and event filter [%s].", reg.ChaincodeID, reg.EventFilter)
  			close(reg.Eventch)
  		}
  	}
  	ed.ccRegistrations = make(map[string]*ChaincodeReg)
  }
docs: // clearChaincodeRegistrations removes all chaincode registrations and closes the corresponding event channels.
  // The listener will receive a 'closed' event to indicate that the channel has been closed.