From 5902442d099c5886d90510ce17b5f4d2a567a951 Mon Sep 17 00:00:00 2001 From: Alejandro Date: Sun, 11 Feb 2024 23:07:34 +0100 Subject: [PATCH] rename method to Close use global connection pool with optional wallet connection name --- connectionprovider.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connectionprovider.go b/connectionprovider.go index 14ad67b..e7c8c8c 100644 --- a/connectionprovider.go +++ b/connectionprovider.go @@ -80,7 +80,7 @@ func (c *PuddleConnectionProvider) Connection(ctx context.Context, endpoint *End func (c *PuddleConnectionProvider) obtainOrCreatePool(connectionKey, address string) *puddle.Pool[*grpc.ClientConn] { connectionPoolsMu.Lock() - pool, exists := connectionPools[address] + pool, exists := connectionPools[connectionKey] connectionPoolsMu.Unlock() if !exists { constructor := func(ctx context.Context) (*grpc.ClientConn, error) { @@ -115,7 +115,7 @@ func (c *PuddleConnectionProvider) obtainOrCreatePool(connectionKey, address str MaxSize: c.poolConnections, }) connectionPoolsMu.Lock() - connectionPools[address] = pool + connectionPools[connectionKey] = pool connectionPoolsMu.Unlock() }