Skip to content

Commit

Permalink
Merge pull request #253 from onevcat/fix/pipeling
Browse files Browse the repository at this point in the history
Not use pipeling by default
  • Loading branch information
onevcat committed Feb 27, 2016
2 parents 107c445 + fb8e91d commit ae87b17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/ImageDownloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ public class ImageDownloader: NSObject {
}
}

/// Whether the download requests should use pipeling or not. Default is false.
public var requestsUsePipeling = false

private var sessionHandler: ImageDownloaderSessionHandler?
private var session: NSURLSession?

Expand Down Expand Up @@ -235,7 +238,7 @@ extension ImageDownloader {

// We need to set the URL as the load key. So before setup progress, we need to ask the `requestModifier` for a final URL.
let request = NSMutableURLRequest(URL: URL, cachePolicy: .ReloadIgnoringLocalCacheData, timeoutInterval: timeout)
request.HTTPShouldUsePipelining = true
request.HTTPShouldUsePipelining = requestsUsePipeling

self.requestModifier?(request)

Expand Down

0 comments on commit ae87b17

Please sign in to comment.