Repository navigation
Fall back to a free port when the view's default port is taken - #279
Conversation
|
Sorry @yourconscience, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 2 days and 4 hours by commenting |
|
@coderabbitai review |
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
Reviewer's GuideImplementationWhen the default bind fails, the view tries its previously recorded address and then a free port, while running-view discovery also checks that recorded address.
DocumentationDocument the fallback behavior, port reuse, and the error for an occupied explicitly supplied address.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Action not completed
|
tackroom viewlistens on127.0.0.1:8765by default and failed withaddress already in usewhen another program held that port.Without
--addr, it now tries the address the last view recorded, then any free port on the same host, says which address it serves on and prints that URL. The recorded address comes first so a view restarted after an upgrade keeps the URL an open tab already has. An explicit--addrthat is taken is still an error.Checked with the built binary in a clean home while another program held 8765:
--addr 127.0.0.1:8765exits 1 with the bind error.Not exercised: the default port being free, which is the unchanged first
net.Listen.Summary by Sourcery
Keep the view available by reusing its recorded loopback address or selecting a free port when the default is occupied.
New Features:
tackroom viewto fall back to a free loopback port when the default port is unavailable and no explicit address was provided.Bug Fixes:
Enhancements:
Documentation:
tackroom view.Summary by CodeRabbit
viewnow tries a previously used free address or selects another available port, then reports the URL.--addris reported as an error rather than silently switching ports.--addrguidance to describe automatic port selection and reuse.