Skip to content

Commit

Permalink
fix: defer
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Sep 18, 2023
1 parent 9ce405e commit 7e4376d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flow/connectors/eventhub/eventhub.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ func (c *EventHubConnector) sendEventBatch(events map[string][]*eventhub.Event,
}).Infof("pushed %d events to event hub: %s",
numEventsPushed, tblName)
mapLock.Lock()
tableNameRowsMapping[tblName] += uint32(len(eventBatch))
defer mapLock.Unlock()
tableNameRowsMapping[tblName] += uint32(len(eventBatch))
}(tblName, eventBatch)
}

Expand Down

0 comments on commit 7e4376d

Please sign in to comment.