From 7da03c8e7c49e6e3024a320dcf17d37618af0265 Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Wed, 27 Sep 2017 18:12:13 -0700 Subject: [PATCH] Fix version comparison when negotiating the the API version Signed-off-by: Yu-Ju Hong Signed-off-by: Sebastiaan van Stijn --- .../cli/vendor/github.com/docker/docker/client/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/cli/vendor/github.com/docker/docker/client/client.go b/components/cli/vendor/github.com/docker/docker/client/client.go index 2072b2f806..893124853f 100644 --- a/components/cli/vendor/github.com/docker/docker/client/client.go +++ b/components/cli/vendor/github.com/docker/docker/client/client.go @@ -248,8 +248,8 @@ func (cli *Client) NegotiateAPIVersionPing(p types.Ping) { cli.version = api.DefaultVersion } - // if server version is lower than the maximum version supported by the Client, downgrade - if versions.LessThan(p.APIVersion, api.DefaultVersion) { + // if server version is lower than the client version, downgrade + if versions.LessThan(p.APIVersion, cli.version) { cli.version = p.APIVersion } }