func (s *Session) ModuleRequestStop(stopType contracts.StopType) (err error) {
	log := s.context.Log()
	log.Infof("Stopping %s.", s.name)
	defer func() {
		if msg := recover(); msg != nil {
			log.Errorf("MessageGatewayService ModuleRequestStop run panic: %v", msg)
			log.Errorf("%s: %s", msg, debug.Stack())
		}
	}()

	if s.controlChannel != nil {
		if err = s.controlChannel.Close(log); err != nil {
			log.Errorf("stopping controlchannel with error, %s", err)
		}
	}

	s.processor.Stop(stopType)

	return nil
}
// ModuleRequestStop handles the termination of the session module
ModuleRequestStop handles the termination of the session module
// ModuleRequestStop handles the termination of the session module
func (s *Session) ModuleRequestStop(stopType contracts.StopType) (err error) {
	log := s.context.Log()
	log.Infof("Stopping %s.", s.name)
	defer func() {
		if msg := recover(); msg != nil {
			log.Errorf("MessageGatewayService ModuleRequestStop run panic: %v", msg)
			log.Errorf("%s: %s", msg, debug.Stack())
		}
	}()
	if s.controlChannel != nil {
		if err = s.controlChannel.Close(log); err != nil {
			log.Errorf("stopping controlchannel with error, %s", err)
		}
	}
	s.processor.Stop(stopType)
	return nil
}
func ( s * Session ) ModuleRequestStop ( stopType contracts . StopType ) ( err error ) { log := s . context . Log ( ) log . Infof ( " " , s . name ) defer func ( ) { if msg := recover ( ) ; msg != nil { log . Errorf ( " " , msg ) log . Errorf ( " " , msg , debug . Stack ( ) ) } } ( ) if s . controlChannel != nil { if err = s . controlChannel . Close ( log ) ; err != nil { log . Errorf ( " " , err ) } } s . processor . Stop ( stopType ) return nil }
ModuleRequestStop handles the termination of the session module
ModuleRequestStop handles the termination of the session module