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

fix: network requests timing out too early #5729

Merged
merged 3 commits into from
Nov 23, 2024

Conversation

pajlada
Copy link
Member

@pajlada pajlada commented Nov 23, 2024

Fixes #5413

QNetworkAccessManager has a limited amount of network requests that can be in flight at the same time. This is reasonable.
We have not taken this into consideration with our custom timeout logic, instead starting the timeout timer as soon as we call execute on the network request, even if the request hasn't even reached the QNetworkAccessManager yet.
With Qt 6.3.0, we gained access to the QNetworkReply::requestSent signal, which is emitted when the request starts flying. This makes our timeouts actually work as expected.

The added test can show a bit more detail how our logic was wrong before.

I expect to have to disable the test for Qt5 builds.

@pajlada
Copy link
Member Author

pajlada commented Nov 23, 2024

image

@pajlada pajlada merged commit 14c4bb6 into master Nov 23, 2024
18 checks passed
@pajlada pajlada deleted the fix/network-request-timeouts-starting-too-early branch November 23, 2024 15:29
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.

Cannot load custom emotes
1 participant