Toqe / Downloader

A library for resuming and multi-part/multi-threaded downloads in .NET written in C#
MIT License
136 stars 50 forks source link

More instances of Downloader #11

Closed Dolus1984 closed 7 years ago

Dolus1984 commented 7 years ago

I want to download two files at same time so i created two threads of Downloader. I am unable in any way to start more than one thread of Downloader in same time. After starting second one it just stay at 0% and do not open connection until first thread is finished. I even tried to rename all variables and create separated void but result was same. I noticed that if numberOfParts is set to 1 i can start second thread at same time and it downloading fine.

Toqe commented 7 years ago

Please have a look at this StackOverflow question. Maybe that's the limititation you're running into. Please let me know if one of the options (System.Net.ServicePointManager.DefaultConnectionLimit or app.config connectionManagement element) work for you, maybe I can then put a hint in the README.

Dolus1984 commented 7 years ago

System.Net.ServicePointManager.DefaultConnectionLimit resolved this issue! Thank you for this suggestion. Would be good to have it updated on Git.

Toqe commented 7 years ago

Ok, I've updated the README.