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

Refactoring query_http_uri #7846

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Refactoring query_http_uri #7846

merged 1 commit into from
Jan 25, 2024

Conversation

drew2a
Copy link
Contributor

@drew2a drew2a commented Jan 23, 2024

While investigating #7671 I found all the places that use the construction async with ClientSession(...) as session: and consolidated them into a single place to handle ServerConnectionError, ClientResponseError, SSLError, ClientConnectorError, asyncio.TimeoutError with a guarantee.

Unfortunately, it turns out that the issue that led to the reopening of #7671 was caused by a completely different case.

However, I think this refactoring is worthwhile (though it is up to the reviewer to decide).

A new file named aiohttp_utils.py has been created. The functions query_uri and unshorten have been placed in this file.

@drew2a drew2a force-pushed the fix/7671 branch 2 times, most recently from 51338cd to 847e89b Compare January 25, 2024 09:54
@drew2a drew2a marked this pull request as ready for review January 25, 2024 10:31
@drew2a drew2a requested review from a team and xoriole and removed request for a team January 25, 2024 10:31
@drew2a drew2a requested a review from xoriole January 25, 2024 12:17
@drew2a drew2a merged commit 35c0930 into Tribler:main Jan 25, 2024
19 of 20 checks passed
@drew2a drew2a deleted the fix/7671 branch January 25, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants