Skip to content

Conversation

@simonjbeaumont
Copy link
Collaborator

Motivation

If the request completes with error after the response has already been received we can potentially resume a continuation twice. This was shown by running some of the tests in long loop.

Modifications

  • Add a shorter test that more reliably reproduced the issue.
  • Add the fix: to set the continuation to nil after resuming it, while still holding the lock.

Result

  • Removed a source of a potential runtime crash.

Test Plan

  • The newly added test, which reliably failed, now reliably passes.

@simonjbeaumont simonjbeaumont marked this pull request as ready for review November 23, 2023 11:44
@simonjbeaumont simonjbeaumont added the 🔨 semver/patch No public API change. label Nov 23, 2023
@simonjbeaumont simonjbeaumont merged commit 8c84285 into apple:main Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants