From 730c880b35e8e7d7f99b31ff388040748baeaba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Thu, 8 Oct 2026 22:08:10 +0200 Subject: [PATCH] vendor: github.com/moby/moby/client v0.6.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit full diff: https://github.com/moby/moby/compare/client/v0.6.1...client/v0.6.2 Signed-off-by: Paweł Gronowski --- vendor.mod | 2 +- vendor.sum | 4 ++-- vendor/github.com/moby/moby/client/hijack.go | 16 +++++++++++++++- vendor/modules.txt | 2 +- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/vendor.mod b/vendor.mod index b4ea9125c14c..eb3bdf8cf248 100644 --- a/vendor.mod +++ b/vendor.mod @@ -34,7 +34,7 @@ require ( github.com/mattn/go-runewidth v0.0.30 github.com/moby/go-archive v0.3.3 github.com/moby/moby/api v1.56.1 - github.com/moby/moby/client v0.6.1 + github.com/moby/moby/client v0.6.2 github.com/moby/patternmatcher v0.6.1 github.com/moby/swarmkit/v2 v2.1.2 github.com/moby/sys/atomicwriter v0.1.0 diff --git a/vendor.sum b/vendor.sum index c43a1e36adda..3a3d7db8256d 100644 --- a/vendor.sum +++ b/vendor.sum @@ -90,8 +90,8 @@ github.com/moby/go-archive v0.3.3 h1:OxxR9paxsluYi+zDUEXTTaIxtkK3viymW+Ka7vRhhME github.com/moby/go-archive v0.3.3/go.mod h1:Npdv43fFqlhZW7Xo8fbm3ZMYFvAGNviUPqX21VERbcE= github.com/moby/moby/api v1.56.1 h1:PpWkvVPB7Fr/No8w+TfyJ/I6rWZ2YPZhT3JorIg+06c= github.com/moby/moby/api v1.56.1/go.mod h1:sZ+THbVWkjOmBPPfbnzdD/G1LuIexWhqlSHHPTDQ1Uk= -github.com/moby/moby/client v0.6.1 h1:gvfKmdcWw+9MzXYP0vAUKQtBTGu1L8475K2nsmL7O98= -github.com/moby/moby/client v0.6.1/go.mod h1:XHgTFqz9NCgS/VuoxXMmEDVmVgXQ4vFEc15wsCIwb24= +github.com/moby/moby/client v0.6.2 h1:ekSPlMccrZGcw6Scb8T9D39qE0mB+XupU/yS0zNw9N4= +github.com/moby/moby/client v0.6.2/go.mod h1:DGcnO7qmPJrqobx/ggQgQ/AUk+2wgVdQv7uxB0/mEsc= github.com/moby/patternmatcher v0.6.1 h1:qlhtafmr6kgMIJjKJMDmMWq7WLkKIo23hsrpR3x084U= github.com/moby/patternmatcher v0.6.1/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/swarmkit/v2 v2.1.2 h1:1WDZAI6HVYNKdCG4zlXnTAPyLsLwuhRGWlHoOUf5Z6I= diff --git a/vendor/github.com/moby/moby/client/hijack.go b/vendor/github.com/moby/moby/client/hijack.go index fb3a2326081b..fbb0402725eb 100644 --- a/vendor/github.com/moby/moby/client/hijack.go +++ b/vendor/github.com/moby/moby/client/hijack.go @@ -42,7 +42,7 @@ func (cli *Client) DialHijack(ctx context.Context, url, proto string, meta map[s return conn, err } -func (cli *Client) setupHijackConn(req *http.Request, proto string) (_ net.Conn, _ string, retErr error) { +func (cli *Client) setupHijackConn(req *http.Request, proto string) (retConn net.Conn, mediaType string, retErr error) { ctx := req.Context() req.Header.Set("Connection", "Upgrade") req.Header.Set("Upgrade", proto) @@ -70,6 +70,20 @@ func (cli *Client) setupHijackConn(req *http.Request, proto string) (_ net.Conn, hc := &hijackedConn{conn, bufio.NewReader(conn)} + // Cancel the handshake without tying the returned connection to ctx. + cancelled := make(chan struct{}) + stop := context.AfterFunc(ctx, func() { + _ = hc.Conn.Close() + close(cancelled) + }) + defer func() { + if !stop() { + // Cancellation won the race; don't return a connection being closed. + <-cancelled + retConn, mediaType, retErr = nil, "", ctx.Err() + } + }() + cfg := &cli.clientConfig var rt http.RoundTripper = otelhttp.NewTransport(hc, cli.traceOpts...) diff --git a/vendor/modules.txt b/vendor/modules.txt index 8b034bc60fcf..876bf0cfa164 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -189,7 +189,7 @@ github.com/moby/moby/api/types/storage github.com/moby/moby/api/types/swarm github.com/moby/moby/api/types/system github.com/moby/moby/api/types/volume -# github.com/moby/moby/client v0.6.1 +# github.com/moby/moby/client v0.6.2 ## explicit; go 1.24 github.com/moby/moby/client github.com/moby/moby/client/internal