Skip to content

fix(port): raise default base port to 60000, validate full block - #12

Merged
htcarr3 merged 1 commit into
mainfrom
better-ports
Feb 26, 2026
Merged

fix(port): raise default base port to 60000, validate full block#12
htcarr3 merged 1 commit into
mainfrom
better-ports

Conversation

@htcarr3

@htcarr3 htcarr3 commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

What

Raises the default base_port from 8000 to 60000 and validates every port in a candidate block before allocating it.

Why

macOS launchd occupies port 8021, causing collisions by the 3rd workspace set with the old default. The 60000 range avoids system-reserved ports entirely.

How

  • Default base_port changed from 8000 to 60000 in applyDefaults()
  • New BlockFree(startPort, count) function checks all ports in a block, not just the first — if any port is occupied, the block is skipped
  • Added guard to stop allocating if a block would exceed port 65535
  • Updated tests and README to reflect new defaults

macOS launchd occupies port 8021, causing collisions by the 3rd
workspace set. Move default base_port from 8000 to 60000 to avoid
system-reserved ports entirely.

Port allocation now checks every port in a candidate block (not just
the first) via BlockFree(), skipping blocks where any port is occupied.
Also guards against allocating above port 65535.
@htcarr3
htcarr3 merged commit 56d1a7d into main Feb 26, 2026
6 checks passed
@htcarr3
htcarr3 deleted the better-ports branch February 26, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant