func (s *Daemon) Close() {
	if s.httpSrv == nil {
		return
	}

	if s.pool != nil {
		s.pool.Close()
	}

	s.log.Infof("HTTP Gateway close for %s ...", s.conf.HTTPListenAddress)
	s.httpSrv.Shutdown()
	for i, srv := range s.grpcSrvs {
		s.log.Infof("GRPC close for %s ...", s.GRPCListeners[i].Addr())
		srv.GracefulStop()
	}
	s.wg.Stop()
	s.statsHandler.Close()
	s.gwCancel()
	s.httpSrv = nil
	s.grpcSrvs = nil
}
// Close gracefully closes all server connections and listening sockets
Close gracefully closes all server connections and listening sockets
// Close gracefully closes all server connections and listening sockets
func (s *Daemon) Close() {
	if s.httpSrv == nil {
		return
	}
	if s.pool != nil {
		s.pool.Close()
	}
	s.log.Infof("HTTP Gateway close for %s ...", s.conf.HTTPListenAddress)
	s.httpSrv.Shutdown()
	for i, srv := range s.grpcSrvs {
		s.log.Infof("GRPC close for %s ...", s.GRPCListeners[i].Addr())
		srv.GracefulStop()
	}
	s.wg.Stop()
	s.statsHandler.Close()
	s.gwCancel()
	s.httpSrv = nil
	s.grpcSrvs = nil
}
func ( s * Daemon ) Close ( ) { if s . httpSrv == nil { return } if s . pool != nil { s . pool . Close ( ) } s . log . Infof ( " " , s . conf . HTTPListenAddress ) s . httpSrv . Shutdown ( ) for i , srv := range s . grpcSrvs { s . log . Infof ( " " , s . GRPCListeners [ i ] . Addr ( ) ) srv . GracefulStop ( ) } s . wg . Stop ( ) s . statsHandler . Close ( ) s . gwCancel ( ) s . httpSrv = nil s . grpcSrvs = nil }
Close gracefully closes all server connections and listening sockets
Close gracefully closes all server connections and listening sockets