Skip to content

fix: bind HTTP server to an OS-assigned ephemeral port#226

Open
G4Zz0L1 wants to merge 1 commit into
pestphp:4.xfrom
G4Zz0L1:fix/ephemeral-http-server-port
Open

fix: bind HTTP server to an OS-assigned ephemeral port#226
G4Zz0L1 wants to merge 1 commit into
pestphp:4.xfrom
G4Zz0L1:fix/ephemeral-http-server-port

Conversation

@G4Zz0L1

@G4Zz0L1 G4Zz0L1 commented Jun 13, 2026

Copy link
Copy Markdown

Avoids the find-then-rebind TOCTOU in Port::find() that intermittently
throws 'Address already in use' when many parallel test workers each
start a LaravelHttpServer. Bind to port 0 and resolve the actual bound
port from getServers() after start.

  Avoids the find-then-rebind TOCTOU in Port::find() that intermittently
  throws 'Address already in use' when many parallel test workers each
  start a LaravelHttpServer. Bind to port 0 and resolve the actual bound
  port from getServers() after start.
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