status-im / nim-chronos

Chronos - An efficient library for asynchronous programming
https://status-im.github.io/nim-chronos/docs/chronos
Apache License 2.0
356 stars 52 forks source link

`HttpServer.baseUri` does not show resolved port #559

Open arnetheduck opened 2 hours ago

arnetheduck commented 2 hours ago

When setting up a server with Port(0), baseUri should use the port given by localAddress so as to make it useful for connecting to the server (ie logging or sending publishing to clients).

arnetheduck commented 2 hours ago

https://github.com/status-im/nim-chronos/blob/9186950e03254b87533715f7c991a537b3167bef/chronos/apps/http/httpserver.nim#L261