Skip to content

Commit

Permalink
"Gather" "metrics" for tasks
Browse files Browse the repository at this point in the history
… because Alamofire waits until metrics have been gathered before
completing now.
  • Loading branch information
cysp committed Mar 10, 2020
1 parent a377bc3 commit 1c0106b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/DVR/Session.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ open class Session: URLSession {
}

if let delegate = delegate as? URLSessionTaskDelegate {
if #available(iOSApplicationExtension 10.0, *) {
let metrics = URLSessionTaskMetrics()
delegate.urlSession?(self, task: task, didFinishCollecting: metrics)
}

delegate.urlSession?(self, task: task, didCompleteWithError: nil)
}
}
Expand Down

0 comments on commit 1c0106b

Please sign in to comment.