From d7f8359f27e526cc0e955bb354d8491a3f9e9ab6 Mon Sep 17 00:00:00 2001 From: yusing Date: Wed, 16 Apr 2025 15:20:25 +0800 Subject: [PATCH] fix: docker clients not caching properly --- internal/docker/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/docker/client.go b/internal/docker/client.go index 99abccc..c3ba621 100644 --- a/internal/docker/client.go +++ b/internal/docker/client.go @@ -27,6 +27,7 @@ type ( refCount uint32 closedOn int64 + key string addr string dial func(ctx context.Context) (net.Conn, error) } @@ -179,6 +180,7 @@ func NewClient(host string) (*SharedClient, error) { Client: client, refCount: 1, addr: addr, + key: host, dial: dial, } @@ -197,7 +199,7 @@ func NewClient(host string) (*SharedClient, error) { } func (c *SharedClient) Key() string { - return c.DaemonHost() + return c.key } func (c *SharedClient) Address() string {