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.
Bug Report
Once the network operation is finished both
client
andsessionTask
of the originrequest
are set tonil
so calling thecurlDescription()
function results in an error.This happens in
completeTask(_ task: URLSessionTask, error: Error?)
function:There is no need anymore to reset these values,
client
is already aweak
var.