diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-05-09 21:43:37 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-05-09 21:43:37 -0500 |
| commit | 594cb8016a4e1a504a8724029cff3d05e389daef (patch) | |
| tree | f5d6b4c48d9903b78d132b4c59c2753d27b27658 /src | |
| parent | f12f152a9ea64c63ed3a719105eeea602cc26c50 (diff) | |
| download | slskd-594cb8016a4e1a504a8724029cff3d05e389daef.tar.gz | |
docs
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Common/SearchResponseCache.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/slskd/Common/SearchResponseCache.cs b/src/slskd/Common/SearchResponseCache.cs index 9e03e7fa..eddc4fbb 100644 --- a/src/slskd/Common/SearchResponseCache.cs +++ b/src/slskd/Common/SearchResponseCache.cs @@ -26,6 +26,9 @@ namespace slskd /// </summary> public class SearchResponseCache : ISearchResponseCache { + /// <summary> + /// Initializes a new instance of the <see cref="SearchResponseCache"/> class. + /// </summary> public SearchResponseCache() { Cache = new MemoryCache(new MemoryCacheOptions()); @@ -62,8 +65,6 @@ namespace slskd /// <returns>A value indicating whether a response for the specified responseToken was removed.</returns> public bool TryRemove(int responseToken, out (string Username, int Token, string Query, SearchResponse SearchResponse) response) { - response = default; - if (Cache.TryGetValue(responseToken, out response)) { Cache.Remove(responseToken); |
