Skip to content

Conversation

@averyanalex
Copy link

From aiohttp docs:

The session contains a cookie storage and connection pool, thus cookies and connections are shared between HTTP requests sent by the same session.

Thus, using the same ClientSession can speed up execution of multiple requests in a row.

@averyanalex
Copy link
Author

This also fixed OSError: [WinError 121] The semaphore timeout period has expired error in my program that sends 100 requests at the same time.

@averyanalex averyanalex marked this pull request as draft February 4, 2024 18:00
@averyanalex averyanalex marked this pull request as ready for review February 4, 2024 18:13
@averyanalex averyanalex force-pushed the cache-aiohttp-session branch from a506cf7 to 8bb28f8 Compare February 4, 2024 18:24
@dotX12
Copy link
Collaborator

dotX12 commented Feb 18, 2024

@averyanalex, hi!
Oh, this is a serious update that will entail a major change in the code for users. I'll think about how this can be done better...

@averyanalex
Copy link
Author

@averyanalex, hi! Oh, this is a serious update that will entail a major change in the code for users. I'll think about how this can be done better...

My friend told me that .stop() is not the best way. It maybe can be done more correctly with context manager. Sorry for my english.

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.

2 participants