diff --git a/src/NServiceBus.NHibernate/Outbox/NHibernateOutboxStorage.cs b/src/NServiceBus.NHibernate/Outbox/NHibernateOutboxStorage.cs index 3bf21e5eb..854728354 100644 --- a/src/NServiceBus.NHibernate/Outbox/NHibernateOutboxStorage.cs +++ b/src/NServiceBus.NHibernate/Outbox/NHibernateOutboxStorage.cs @@ -55,7 +55,7 @@ protected override void OnStart() } else { - if (TimeSpan.TryParse(configValue, out timeToKeepDeduplicationData)) + if (!TimeSpan.TryParse(configValue, out timeToKeepDeduplicationData)) { throw new Exception("Invalid value in \"NServiceBus/Outbox/NHibernate/TimeToKeepDeduplicationData\" AppSetting. Please ensure it is a TimeSpan."); } @@ -69,7 +69,7 @@ protected override void OnStart() } else { - if (TimeSpan.TryParse(configValue, out frequencyToRunDeduplicationDataCleanup)) + if (!TimeSpan.TryParse(configValue, out frequencyToRunDeduplicationDataCleanup)) { throw new Exception("Invalid value in \"NServiceBus/Outbox/NHibernate/FrequencyToRunDeduplicationDataCleanup\" AppSetting. Please ensure it is a TimeSpan."); }