Skip to content

Failure to gracefully exit on failure to bind to port  #4

Description

@m3rchant-man

Description:

When a existing server is already bound to 8080 it fails with console output instead of gracefully exiting.

Actual

We can see this from this log

2025/10/30 10:15:10 Starting OpenChamp server...
2025/10/30 10:15:10 Database tables initialized successfully
2025/10/30 10:15:10 Server is running on :8080
2025/10/30 10:15:10 Game server ports range: 7000-8000
2025/10/30 10:15:10 Server starting on :8080
2025/10/30 10:15:10 Queue processor started
2025/10/30 10:15:10 Server stopped: listen tcp :8080: bind: address already in use

...
[hangs and waits for impossible calls]

Expected

2025/10/30 10:15:10 Starting OpenChamp server...
2025/10/30 10:15:10 Database tables initialized successfully
2025/10/30 10:15:10 Server is running on :8080
2025/10/30 10:15:10 Game server ports range: 7000-8000
2025/10/30 10:15:10 Server starting on :8080
2025/10/30 10:15:10 Queue processor started
2025/10/30 10:15:10 Server stopped: listen tcp :8080: bind: address already in use

[Shuts down]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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