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

aiohttp==2.2.0 Unclosed client session warning #2044

Closed
Rybak5611 opened this issue Jun 30, 2017 · 2 comments
Closed

aiohttp==2.2.0 Unclosed client session warning #2044

Rybak5611 opened this issue Jun 30, 2017 · 2 comments
Labels

Comments

@Rybak5611
Copy link

Long story short

After fixing #1981 there is now new bug, causing Unclosed client session warnings when repeating requests.

Expected behaviour

No warnings.

Actual behaviour

Warnings.

Steps to reproduce

import aiohttp
import asyncio

async def Init():

	for N in range( 5 ): # Key difference from #1981 test, warnings only happen when repeating the request

		Response = await aiohttp.request( "GET", "http://www.google.com/" )

		async for Line in Response.content:
			print( "Received {} bytes".format( len( Line ) ) )


if __name__ == "__main__":

	Loop = asyncio.get_event_loop()
	Loop.run_until_complete( Init() )

Your environment

Tested on Windows 10 build 15063, Debian 8
Python 3.6, aiohttp==2.2.0

Traceback ( aiohttp 2.2.0 )

PS C:\Users\root\Desktop> pip install aiohttp==2.2.0 -q
PS C:\Users\root\Desktop> .\test.py
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x040C79D0>
Received 3362 bytes
Received 1580 bytes
Received 85 bytes
Received 2 bytes
Received 6281 bytes
Received 29 bytes
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x0376CD90>
Received 3273 bytes
Received 1580 bytes
Received 85 bytes
Received 2 bytes
Received 6281 bytes
Received 29 bytes
Received 3363 bytes
Received 1580 bytes
Received 85 bytes
Received 2 bytes
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x0376CCB0>
Received 6279 bytes
Received 29 bytes
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x040D7E30>
@Rybak5611
Copy link
Author

Duplicate of #2036

@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant