Skip to content

Commit

Permalink
Makes a session manage only one queue for its lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
Dasmer Singh committed Sep 21, 2015
1 parent 9ce441e commit 0262a86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DVR/SessionDataTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class SessionDataTask: NSURLSessionDataTask {
weak var session: Session!
let request: NSURLRequest
let completion: Completion?
private let queue = dispatch_queue_create("com.venmo.DVR.sessionDataTaskQueue", nil)


// MARK: - Initializers
Expand All @@ -36,7 +37,6 @@ class SessionDataTask: NSURLSessionDataTask {
if let interaction = cassette?.interactionForRequest(request) {
// Forward completion
if let completion = completion {
let queue = dispatch_queue_create("com.venmo.DVR.sessionDataTaskQueue", nil)
dispatch_async(queue) {
completion(interaction.responseData, interaction.response, nil)
}
Expand Down

0 comments on commit 0262a86

Please sign in to comment.