From f85848ade97bd1e07e39805d4e97c6e4e76b9178 Mon Sep 17 00:00:00 2001 From: Chui Tey Date: Fri, 24 Feb 2017 09:11:55 +1000 Subject: [PATCH] Fix a 65-byte leak per message dispatched --- src/Nimbus/ConcurrentCollections/ThreadSafeDictionary.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +}