Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPClient and URLSessionTask are removed after the completion, also breaking the cURLDescription() #56

Closed
malcommac opened this issue Jul 23, 2022 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@malcommac
Copy link
Collaborator

malcommac commented Jul 23, 2022

Bug Report

Once the network operation is finished both client and sessionTask of the origin request are set to nil so calling the curlDescription() function results in an error.

This happens in completeTask(_ task: URLSessionTask, error: Error?) function:

        // Reset the link to the client
        handler.request.client = nil
        handler.request.sessionTask = nil

There is no need anymore to reset these values, client is already a weak var.

@malcommac malcommac added the bug Something isn't working label Jul 23, 2022
@malcommac malcommac added this to the 1.6.1 milestone Jul 23, 2022
@malcommac malcommac self-assigned this Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant