docker / engine-api

DEPRECATED: Please see https://github.com/docker/docker/tree/master/client
Apache License 2.0
264 stars 163 forks source link

ensure transport.Client be closed #383

Closed qudongfang closed 8 years ago

qudongfang commented 8 years ago

ensure transport.Client be closed especially needed while using cli.NewClient with *http.Client = nil for example

client.NewClient("unix:///var/run/docker.sock", nil, "v1.18", map[string]string{"User-Agent": "engine-api-cli-1.0"})
GordonTheTurtle commented 8 years ago

Please sign your commits following these rules: https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work The easiest way to do this is to amend the last commit:

$ git clone -b "ensure_transport_be_closed" git@github.com:castomer/engine-api.git somewhere
$ cd somewhere
$ git rebase -i HEAD~2
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

vdemeester commented 8 years ago

https://github.com/docker/docker/pull/26402 takes this into account, closing that PR