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

AsyncClient overwrites http_session after disconnect #226

Closed
JoriDubrovin opened this issue May 20, 2021 · 1 comment
Closed

AsyncClient overwrites http_session after disconnect #226

JoriDubrovin opened this issue May 20, 2021 · 1 comment
Assignees
Labels

Comments

@JoriDubrovin
Copy link

The AsyncClient constructor takes a http_session parameter for customizing the aiohttp.ClientSession. This works for the first connection, but if the client is disconnected, then upcoming connections overwrite the session by a fresh aiohttp.ClientSession(), losing the customizations.

Should http_session be e.g. a function that constructs ClientSessions instead?

@miguelgrinberg miguelgrinberg self-assigned this May 20, 2021
@miguelgrinberg
Copy link
Owner

I'll see if the original session can be preserved, so that a function isn't necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants