Skip to content

Conversation

ianpartridge
Copy link
Contributor

Currently the HTTPResponseDelegate has no access to the HTTPTask. This means that cancellation is not supported if a request is being streamed via the delegate.

Solve this by storing a reference to the HTTPTask in the HTTPTaskHandler, so it can pass the task through as it call the delegate methods.

Fixes #9.

Copy link
Contributor

@weissi weissi left a comment

Choose a reason for hiding this comment

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

awesome, thanks @ianpartridge

@weissi weissi merged commit a6c9f86 into swift-server:master Apr 12, 2019
@weissi weissi deleted the delegate-cancellation branch April 12, 2019 10:36
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.

Cannot cancel inside delegate
3 participants