Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set HTTPMaximumConnectionsPerHost to PINRemoteImageHTTPMaximumConnectionsPerHost only if user don't provide sessionConfiguration #516

Conversation

zhongwuzw
Copy link
Contributor

If user provide its own sessionConfiguration, we need to respect their configuration, so here we set HTTPMaximumConnectionsPerHost to PINRemoteImageHTTPMaximumConnectionsPerHost,but it may not always user expected, and HTTPMaximumConnectionsPerHost is for any url which belongs to the same host, so it's different from MaxConcurrentOperations.

The original commit is from #342, but I think HTTPMaximumConnectionsPerHost little than MaxConcurrentOperations not means it would always timeout, because they are different concepts. :) And in weak network quality, I think we need to constrain the tcp connections, not set maximum connections to a unlimited number.

…ionsPerHost only if user don't provide sessionConfiguration
@bolsinga
Copy link
Contributor

bolsinga commented Jul 9, 2019

Please add a test.

Copy link
Collaborator

@garrettmoon garrettmoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right that this is a good change. I'm wondering if we should update the documentation in the header to mention that users don't want to forget to set it if they provide they're own sessionConfiguration?

@zhongwuzw
Copy link
Contributor Author

@garrettmoon Yep, I agree, tell users to set HTTPMaximumConnectionsPerHost if they provide their own sessionConfiguration.

@bolsinga
Copy link
Contributor

Thanks for the test!

@garrettmoon
Copy link
Collaborator

@zhongwuzw do you mind adding an entry to CHANGELOG.md for this one?

@zhongwuzw
Copy link
Contributor Author

Changelog added.

@ghost
Copy link

ghost commented Jul 11, 2019

🚫 CI failed with log

@ghost
Copy link

ghost commented Jul 11, 2019

🚫 CI failed with log

@garrettmoon
Copy link
Collaborator

Mind rebasing against master? I think I fixed a flakey test.

@ghost
Copy link

ghost commented Jul 24, 2019

🚫 CI failed with log

@bolsinga bolsinga merged commit c3464f6 into pinterest:master May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants