Skip to content
This repository has been archived by the owner on Nov 23, 2019. It is now read-only.

Cancellation on streaming requests can lead to connection leak #4

Closed
mathpl opened this issue Jan 6, 2016 · 3 comments
Closed

Cancellation on streaming requests can lead to connection leak #4

mathpl opened this issue Jan 6, 2016 · 3 comments
Assignees

Comments

@mathpl
Copy link

mathpl commented Jan 6, 2016

When doing a streaming request we can end-up leaking connections to the docker daemon if there's no activity on the stream. A simple example of this is calling Client.ContainerLogs() with Follow:true and stopping. No new logs must be generated from that point on. While we do have access to http.Response.Body to close it, the connection will only close on the next write error.

This module would make cancellation fairly easy to integrate with the current code.

@mathpl mathpl changed the title Cancelation on streaming requests can lead to connection leak Cancellation on streaming requests can lead to connection leak Jan 6, 2016
@calavera
Copy link
Contributor

calavera commented Jan 6, 2016

I agree with you, it's a good feature to have for those requests that handle streams. We manage cancellations in the server already, so we should incorporate them in the client too.

@calavera
Copy link
Contributor

Please, take a look at #35.

@mathpl
Copy link
Author

mathpl commented Jan 12, 2016

Looks great!

@LK4D4 LK4D4 closed this as completed in #35 Feb 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants