diff --git a/src/Nimbus/ConcurrentCollections/ThreadSafeDictionary.cs b/src/Nimbus/ConcurrentCollections/ThreadSafeDictionary.cs index 14532bd..1ea3505 100644 --- a/src/Nimbus/ConcurrentCollections/ThreadSafeDictionary.cs +++ b/src/Nimbus/ConcurrentCollections/ThreadSafeDictionary.cs @@ -52,7 +52,7 @@ public bool TryRemove(TKey key, out TValue value) { lock (_dictionary) { - if (_dictionary.ContainsKey(key)) return false; + if (!_dictionary.ContainsKey(key)) return false; value = _dictionary[key]; _dictionary.Remove(key); @@ -129,4 +129,4 @@ private object LockForKey(TKey key) } } } -} \ No newline at end of file +}