diff --git a/src/DynamoCore/Logging/DynamoAnalyticsClient.cs b/src/DynamoCore/Logging/DynamoAnalyticsClient.cs index 98138164e73..e4d855d0552 100644 --- a/src/DynamoCore/Logging/DynamoAnalyticsClient.cs +++ b/src/DynamoCore/Logging/DynamoAnalyticsClient.cs @@ -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) {