-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
ClientSession keep transferring data after closed #2497
Comments
@asvetlov has accidentally closed this with misleading commit reference. |
The streaming interface does the right thing: if you call response.content.read(1000) and then response.close(), looks like only the first 256k of the response is read (a single read). I observed this using strace, if you're on Linux it's worth using strace instead of looking at the process size etc. I used strace with your example and it behaved the same as the streaming interface (at least in Linux), a single system call read that got 256k of the file. Here's what it looks like with timestamps:
The EINTR is when I hit ^C |
Long story short
After a ClientSession is closed it keeps connected to the server and keeps transferring data.
Steps to reproduce
When I run this code the process cpu usage goes to 90+% and the memory usage keeps increasing.
Also I can see the process is still connected to the server.
I tried explicitly closing client session but it has same behavior.
The text was updated successfully, but these errors were encountered: