diff --git a/flow/connectors/eventhub/eventhub.go b/flow/connectors/eventhub/eventhub.go index e1ca5dece4..c2f3263097 100644 --- a/flow/connectors/eventhub/eventhub.go +++ b/flow/connectors/eventhub/eventhub.go @@ -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) }