Skip to content

Wait for Apple connection completion in connect_timeout - #680

Open
RanaPriyansh wants to merge 3 commits into
rust-lang:masterfrom
RanaPriyansh:fix/apple-connect-timeout-652
Open

RanaPriyansh wants to merge 3 commits into
rust-lang:masterfrom
RanaPriyansh:fix/apple-connect-timeout-652

Conversation

@RanaPriyansh

@RanaPriyansh RanaPriyansh commented Oct 20, 2026 •

Copy link
Copy Markdown

Revives the Apple completion check from #669 for #652, with additional validation.

On Apple targets, continue through the existing completion poll after connect succeeds. Keep immediate success on other targets. Extend the loopback test to check IPv4 and IPv6 peer identity, accepted data, and blocking-mode restoration. The IPv6 loopback check skips Redox and Vita.

A private syscall-interposition probe calls the public API: baseline returns Ok without polling; candidate returns TimedOut after one target poll. Both pass a non-target loopback transfer. This checks dispatch; the reported VPN setup was not reproduced.

The default cargo test --all-features command failed on both baseline and candidate because existing qnx cfg diagnostics are denied during tests. Successful local macOS checks declared this existing cfg with --check-cfg=cfg(target_os,values("qnx")). Blocking mode was observed only on local macOS. The local checks do not establish other-platform runtime behavior or the reported VPN configuration. All 58 reported hosted checks passed on prior head 9a39af9efbb9f1c38c47d5aacec7f570a12ac3d3 in CI run 39505258595. That head predates this comment-only follow-up. Cross-target compilation does not establish runtime execution on each target.

Codex used.

Comment thread src/socket.rs

match res {
Ok(()) => return Ok(()),
Ok(()) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we keep the comment from #669 explaining why this exists? without it, Ok(()) falling through to poll looks like a bug imho

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for raising this. I restored the rationale from #669 above the Apple-specific path: a successful non-blocking connect can precede completion, so Apple targets continue to poll_connect. This change restores the comment only and adds no runtime evidence.

Codex used.

This branch has not been deployed

No deployments
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.

3 participants