Skip to content

Binding to port 0 (uses a random unused port) works, but does not inform what port it bound to #186

@mickvandijke

Description

@mickvandijke

If you bind the [udp_tracker], [http_tracker] or [http_api] to port 0. The OS will bind to a random unused port.

This is to be expected. Torrust however does not inform the user which ports have been bound to.

This is what the console displays:

2023-02-16T12:35:49.246529+01:00 [torrust_tracker::jobs::udp_tracker][INFO] Starting UDP server on: udp://0.0.0.0:0

While the udp server actually bound to port 52862 in my case.

It would be nice to log the actual bound ports in the console.

[PR #156] provides a wrapper struct for the udp server and http api. These wrapper structs also include the bind_address (udp server) for the udp server or http api.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions