Repository navigation
Conversation
A combination of curl#23482 and curl#23445 with added test. - on macOS, do not treat select errors are definite - add debug env var to simulate a delay after opening a connection socket, so the test server has time to accept, send data and close before curl continues - add test_05_11 as reproducer
This was referenced Oct 20, 2026
There was a problem hiding this comment.
🟡 Changes recommended
The debug delay runs before connect(), leaving the regression test’s required timing unreliable.
1 open issue
What changed in this PR
Addresses macOS connection failures when a server sends a response and closes before curl checks connect completion.
Changes:
- Verifies socket errors on macOS before declaring connection failure.
- Adds a debug delay setting and an early-close regression test.
| File | Description |
|---|---|
| tests/http/test_05_errors.py | Adds an early-response server and regression test. |
| lib/cf-socket.c | Updates connect verification and adds the debug delay. |
| docs/libcurl/libcurl-env-dbg.md | Documents the debug delay setting. |
Review effort: Balanced
- move wait after first connect() call - rename var to `CURL_DBG_SOCK_CONNECT_WAIT_MS`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

A combination of #23482 and #23445 with added test.