From 6a99a989206c3802d9296e508ff3096d61974843 Mon Sep 17 00:00:00 2001 From: Nick Dubelman Date: Thu, 16 May 2024 11:33:56 -0700 Subject: [PATCH] close connections --- sync.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sync.go b/sync.go index 434e33e..f881a22 100644 --- a/sync.go +++ b/sync.go @@ -54,6 +54,9 @@ func (job JobConfig) syncTargets() (string, []SyncResult, error) { return "", nil, err } + // Close the source connection pool + source.Close() + sourceChecksum, err := checksumData(sourceEntries) if err != nil { return "", nil, err @@ -68,6 +71,7 @@ func (job JobConfig) syncTargets() (string, []SyncResult, error) { defer wg.Done() checksum, synced, err := target.syncTarget(sourceChecksum, sourceMap) + target.Close() // Close the target's connection pool resultChan <- SyncResult{ Target: target.config,