Skip to content

Terminate server with no activate connections #138

@OskarGroth

Description

@OskarGroth

I'm using a MachService (LaunchDaemon). startAndBlock will run this forever, but I'd like to quit the process if there are no active connections for a while (say 30 sec). I'm thinking that using start and my own run loop would be the best solution here.

However, there is no way to tell how many active, valid connections there are because it's all handled internally. The only place I can see is listening for .connectionInvalid in setErrorHandler, but that is not enough to determine that the server should quit. How should this use case be implemented?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions