async-http-client icon indicating copy to clipboard operation
async-http-client copied to clipboard

Add testProxyStreamingNoDeadlock test

Open PopFlamingo opened this issue 5 years ago • 1 comments

Because there is a maximum number of concurrent connections per host it is possible for the client to deadlock itself when making requests with a streamed body if the body data is itself requested from the same host.

If we reach the maximum number of concurrent requests for a certain host, and if all active tasks use a streamed body that obtains its data from requests to the same host, then the bodies will never be obtained as the requests they need to make will be put on a queue whose ability to dequeue them depends on their very result -> deadlock.

PopFlamingo avatar Mar 13 '20 06:03 PopFlamingo

Just as a heads up, the main development branch has been changed to main, following the Swift policy on this.

This PR has been re-targeted to main and should just work. However when performing rebases etc please keep this in mind -- you may want to fetch the main branch and rebase onto the main branch from now on since master is not up-to-date anymore and is going to be deleted shortly.

ktoso avatar Aug 20 '20 01:08 ktoso