Fix/windows ci compat - #6189
Merged
Merged
Conversation
Keep every overlapped submission registered until Windows delivers its completion packet. Cancellation now drains completion before returning, and reactor teardown cancels and reaps pending coroutine, reactor, and cURL work before closing the completion port.\n\nTrack live submissions directly, preserve caller-owned buffers through cancellation, and let a completion that wins the race return its real result. Separate Winsock and Win32 error mapping so control-plane failures and cancellation results report the correct errno.\n\nAlso clear stale listener errors after a successful accept and remove unused accepted-socket state.
Exercise timeout, coroutine cancellation, repeated socket cancellation, task accounting, and socket reuse against a local IOCP listener. Cover reactor shutdown with an untimed pending accept so teardown must cancel and drain the operation before releasing the completion port.
Let Windows select the protocol for AF_INET stream sockets. PHP on Windows does not define IPPROTO_TCP, so the explicit constant prevented both IOCP regression tests from reaching their target paths.
Keep the Windows cancellation regression in Swoole's normalized errno domain instead of comparing it with ext-sockets' Winsock constants. Capture one verified timeout and cancellation code, then require every related path to preserve the correct category.
Remove the Windows-only success reset from the accept override so it matches the base socket behavior. Keep the cancellation regression focused on completion lifetime without asserting an error-property reset that the PHP accept API does not publish.
Record the number of pending submissions when IOCP teardown begins and include the initiating resume error in the operation's single completion trace.\n\nDocument that callback poll operations are completion-owned so reactor teardown must leave their storage to the IOCP drain.
Leave both a coroutine accept and a reactor AFD poll pending when the event loop exits. This verifies that IOCP teardown drains callback-owned and coroutine-owned operations before releasing their storage. Match the existing Windows test convention for platform guards.
Require Event::add() to return its documented integer descriptor before relying on the pending reactor operation during teardown.
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.
No description provided.