Repository: vapor/vapor
File: Sources/Vapor/Application.swift (Swift)

Code before:
        } catch {
            self.logger.report(error: error)
            throw error
        }
    }

    /// When called, this will execute the startup command provided through an argument. If no startup command is
    /// provided, the default is used. Under normal circumstances, this will start running Vapor's webserver.
    ///
    /// If you `start` Vapor through this method, you'll need to prevent your Swift Executable from closing yourself.
    /// If you want to run your Application indefinitely, or until your code shuts the application down,
    /// use `run()` instead.
    public func start() throws {
        try self.boot()

        let commands = self.commands.group()
        let asyncCommands = self.asyncCommands.group()
        let combinedCommands = asyncCommands.merge(
            with: commands,
            defaultCommand: commands.defaultCommand,
            help: commands.help
        )

        var context = CommandContext(console: self.console, input: self.environment.commandInput)
        context.application = self
        try self.eventLoopGroup.next()
            .makeFutureWithTask { [context] in
                try await self.console.run(combinedCommands, with: context)
            }
            .wait()
    }

    public func boot() throws {
        try self.isBooted.withLockedValue { booted in
            guard !booted else {
                return
            }
            booted = true
            try self.lifecycle.handlers.forEach { try $0.willBoot(self) }
            try self.lifecycle.handlers.forEach { try $0.didBoot(self) }
        }
    }

    public func shutdown() {
        assert(!self.didShutdown, "Application has already shut down")
        self.logger.debug("Application shutting down")

        self.logger.trace("Shutting down providers")
        self.lifecycle.handlers.reversed().forEach { $0.shutdown(self) }
        self.lifecycle.handlers = []


Review comment (suggestion):
```suggestion
        try self.eventLoopGroup.any()
```

Code after:
        } catch {
            self.logger.report(error: error)
            throw error
        }
    }

    /// When called, this will execute the startup command provided through an argument. If no startup command is
    /// provided, the default is used. Under normal circumstances, this will start running Vapor's webserver.
    ///
    /// If you `start` Vapor through this method, you'll need to prevent your Swift Executable from closing yourself.
    /// If you want to run your Application indefinitely, or until your code shuts the application down,
    /// use `run()` instead.
    public func start() throws {
        try self.boot()

        let commands = self.commands.group()
        let asyncCommands = self.asyncCommands.group()
        let combinedCommands = asyncCommands.merge(
            with: commands,
            defaultCommand: commands.defaultCommand,
            help: commands.help
        )

        var context = CommandContext(console: self.console, input: self.environment.commandInput)
        context.application = self
        try self.eventLoopGroup.any()
            .makeFutureWithTask { [context] in
                try await self.console.run(combinedCommands, with: context)
            }
            .wait()
    }

    public func boot() throws {
        try self.isBooted.withLockedValue { booted in
            guard !booted else {
                return
            }
            booted = true
            try self.lifecycle.handlers.forEach { try $0.willBoot(self) }
            try self.lifecycle.handlers.forEach { try $0.didBoot(self) }
        }
    }

    public func shutdown() {
        assert(!self.didShutdown, "Application has already shut down")
        self.logger.debug("Application shutting down")

        self.logger.trace("Shutting down providers")
        self.lifecycle.handlers.reversed().forEach { $0.shutdown(self) }
        self.lifecycle.handlers = []