Skip to content

Invalidate finished test sessions without cancelling tasks - #36

Closed
mattt wants to merge 1 commit into
mainfrom
mattt/fix-continuation-crash
Closed

mattt wants to merge 1 commit into
mainfrom
mattt/fix-continuation-crash

Conversation

@mattt

@mattt mattt commented Nov 24, 2026

Copy link
Copy Markdown
Owner

No description provided.

On Linux, URLSession.data(for:) resumes its continuation before it marks the task completed when a URLProtocol finishes off the session's work queue. Cancelling the session in that window resumes the continuation a second time and crashes the test process. These sessions have no running tasks to cancel, so finishTasksAndInvalidate() releases them without the race.
@mattt mattt closed this Nov 24, 2026
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