Closed hschouman closed 2 years ago
On line 438 of HTTPDataLoader on version 1.5.2 there is the following line.
Of course, we should call client's delegate to the main thread:
if let client = self.client {
client.delegate?.client(client, didFinish: (handler.request, task), response: response)
}
However, it should be not your issue. Have you found a way to replicate this issue? Did you perform some action in your HTTPClient
's delegate
object for that event?
Not found a way to replicate yet. Yes we use the delegate object for that event to forward the request.task
,response.error?.error
and response.data
to Datadog methods : URLSessionInterceptor.shared?.taskCompleted(task: task, error: error)
and URLSessionInterceptor.shared?.taskReceivedData(task: task, data: data)
.
Also with Xcode beta I have two warnings that are not here with Xcode 13.4.1, that could be related :
The warning should be okay with the fixes on main branch where events to delegate are sent in main thread. May you have a look and test it?
Ok I will fetch and try the main branch on a beta with enough people to say if it fixed the crash. Thanks for your help !
Bug Report
Summary
Hello, I am experiencing some crash using RealHTTP on my app. Not sure if it comes from the lib or the use I do.
Current behavior
The app crash when deallocating a pointer on line 438 of the file HTTPDataLoader.swift.
How to reproduce
2% of my users are experiencing the crash but not sure of how to reproduce for the moment.
Here are the stack trace : crash.txt
Thanks for your help