Skip to content

Alternate HTTP1 and HTTP2 attempts#21

Merged
sindresorhus merged 1 commit into
sindresorhus:mainfrom
chrisguttandin:main
May 15, 2026
Merged

Alternate HTTP1 and HTTP2 attempts#21
sindresorhus merged 1 commit into
sindresorhus:mainfrom
chrisguttandin:main

Conversation

@chrisguttandin
Copy link
Copy Markdown
Contributor

Right now wait-for-localhost runs a fixed number (6) of attempts over HTTP1 before switching to HTTP2. This causes it to fail to wait for an HTTP1 server which takes a little longer to be up and running. I think it would be better to alternate between HTTP1 and HTTP2 up until the server is running.

Since the change is very simple I went ahead and turned it into a PR. Please feel free to edit or reject it if you think this doesn't make sense.

@sindresorhus sindresorhus merged commit 07f19c4 into sindresorhus:main May 15, 2026
2 checks passed
@sindresorhus
Copy link
Copy Markdown
Owner

Makes sense 👍

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.

2 participants