Skip to content

Commit

Permalink
Update DynamoAnalyticsClient.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
pinzart90 committed Jan 15, 2025
1 parent f1dc508 commit fb776aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/DynamoCore/Logging/DynamoAnalyticsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,13 @@ public void Dispose()
// If the Analytics Client was initialized, shut it down.
// Otherwise skip this step because it would cause an exception.
if (Service.IsInitialized)
Service.ShutDown();
{
// Lock shutdown sequence in case other tracking calls might be executing concurently.
lock(trackEventLockObj)
{
Service.ShutDown();
}
}

if (Session != null)
{
Expand Down

0 comments on commit fb776aa

Please sign in to comment.