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

Fix task description not being used with URLSessionProxyDelegate #255

Merged
merged 1 commit into from
May 23, 2024

Conversation

alexjameslittle
Copy link
Contributor

@alexjameslittle alexjameslittle commented May 23, 2024

We are using the URLSessionProxyDelegate to record network tasks to pulse. #254 introduced task description support for custom titles, however this was not working with URLSessionProxyDelegate as the URLSessionDataTask didn't have a taskDescription in func urlSession(_ session: URLSession, didCreateTask task: URLSessionTask) as it is added directly after creation like below:

dataTask = self.dataTask(with: request) { data, response, error in
   
}
dataTask?.taskDescription = taskDescription
dataTask?.resume()

@kean
Copy link
Owner

kean commented May 23, 2024

Great catch, thank you! I tested it only with mocks.

@kean kean merged commit 3e316d5 into kean:main May 23, 2024
@alexjameslittle alexjameslittle deleted the fix/al/task-description branch May 23, 2024 15:56
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.

None yet

2 participants