superfluous warning from random_port
itcarroll opened this issue · 1 comments
itcarroll commented
Calling random_port()
gives the warning createTcpServer: address already in use
. I think that's kind of already known ... given that you are requesting a non-default port. The warning also causes confusion when a R_SERVR_PORT environment variable is found by httd
:
> Sys.getenv('R_SERVR_PORT')
[1] "4169"
> servr::httd('/path')
createTcpServer: address already in use
To stop the server, run servr::daemon_stop(1) or restart your R session
Serving the directory /path at http://127.0.0.1:4169
The specified address was not already in use, it's just that random_port()
got (un-lazily, for whatever reason) evaluated. Maybe an easy solution is to remove that warning?
yihui commented
Should be fixed now. Thanks for the report!