Skip to content

Conversation

@dnadoba
Copy link
Collaborator

@dnadoba dnadoba commented Aug 4, 2022

Motivation

If the deadline is exceeded and the connection state machine fails the request with an error, we forgot to transition to the finished state in the RequestBag. A symptom of this is that a request could afterwards still be canceled from user code and it would trigger a second call to the delegates didRecieveError method.

Modification

  • transition to the finished state
  • add a test which fails without the change above

Result

didReceiveError can't be called twice

@dnadoba dnadoba added the 🔨 semver/patch No public API change. label Aug 4, 2022
@Lukasa Lukasa merged commit 3960678 into swift-server:main Aug 4, 2022
@dnadoba dnadoba deleted the dn-fix-cancel-after-deadline-exceeded branch August 4, 2022 12:57
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