HttpConnection - deadlock?
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
ive got some problems with downloading multiple files on slow connection. For example my index.html got in debug 100 files(css and js) and in release 4 files(css and js), some files are over 2mb, even compressed. All browsers now are downloading in parallel files, so for example chrome (when my app is in release mode) is trying to download 3 files in parallel, all are over 2mb. On slow connection it takes some time to download 2mb (almoust always over 15 sec, on 3G with VPN).
The problem is that browser is getting only like 40kb and than it hangs doing nothing.
After 15k ms(your timeout) the "onTimeout" is rised and the connection is closed. So those 3 files get ERR_CONTENT_LENGTH_MISMATCH. Also it doesnt matter if im sending chunked or not.
Maybe lock should be on smaller parts of code and timout should be on every chunk instead of whole response?
Oh and the problem also in mainly on Linux, Windows is working better, but also sometimes it has such error.
Regards,
Piotr Jarocki
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with HttpConnection's response handling and the 15-second timeout/onTimeout path described in the report. Reproduce parallel downloads on a slow Linux connection, then determine whether timeout behavior is incorrectly applied while chunks are still arriving; done means large concurrent downloads complete without ERR_CONTENT_LENGTH_MISMATCH.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100