From 7e4376d3ab1cadb67514f7cf00ef90c8ae51132f Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Mon, 18 Sep 2023 20:50:21 +0530 Subject: [PATCH] fix: defer --- flow/connectors/eventhub/eventhub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) }