func()

in internal/pkg/core/router/service.go [234:243]


func (rs *RouterService) StopServer() {
	if rs.server != nil {
		rs.logger.Info("Shutting down HTTP  server...")
		shutdownCtx, shutdownRelease := context.WithTimeout(context.Background(), 10*time.Second)
		defer shutdownRelease()
		if err := rs.server.Shutdown(shutdownCtx); err != nil {
			rs.logger.Error("Error shutting down HTTP server", "error", err.Error())
		}
	}
}