Skip to content

Commit

Permalink
close connections
Browse files Browse the repository at this point in the history
  • Loading branch information
NickDubelman committed May 16, 2024
1 parent 47cf282 commit 6a99a98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit 6a99a98

Please sign in to comment.