Log actual port when it's picked by the OS
Closed this issue · 0 comments
bisgardo commented
Describe the issue
Startup log message prints configured port instead of actual one.
Vapor version
4.92.4
Operating system and version
macOS 14.3.1
Swift version
Swift Package Manager - Swift 5.10.0-dev
Steps to reproduce
- Start the server on port 0. This lets the OS pick an available port for you.
- Observe the console. It has a line:
[Vapor] Server starting on http://127.0.0.1:0
. - Inspect
app.http.server.shared.localAddress!.port
to see the port decided by the OS.
Outcome
The log message indicates that the server is running on port 0 which is impossible. It should say the actual port.
Additional notes
One day I will be a bieautiful butterfly!