3

I have a custom SessionManager CustomSessionManager which I am using to construct the ImageDownloader of Alamofire like this

let imageDownloader = ImageDownloader(sessionManager: CustomSessionManager.shared)

In the initialiser the ImageDownloader sets the startRequestImmdediately to false. Due to this, all the requests using CustomSessionManager fail to start.

What is the downside of setting startRequestImmdediately to true?. Does it have any negative impact?.

1 Answers1

0

As one might see from AlamofireImage code inspection, setting startRequestImmdediately to false is needed for keeping simultaneous downloads count under control (below maximumActiveDownloads).

Alamofire request is created but not started until we have free connection slots.

Divyanshu Srivastava
  • 1,379
  • 11
  • 24
metaine
  • 1
  • 3