There are a couple issues with the design that I think are now presenting as bugs:
The server is not able to kill connections so the port cannot be reused, I've observed that this can cause the ui to not render until you land on a free port.
The ports are saved in a dictionary tied to the file they represent so that in theory they can be reused, however, I think they may be being removed from that dictionary prematurely.
In theory we should be able to just reuse the existing server:port. Investigate why that bit isn't working.
There are a couple issues with the design that I think are now presenting as bugs: