diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-03-27 18:44:58 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-27 18:44:58 -0500 |
| commit | eec6e0f098effcb9bfda297a441ca7ffd8d33934 (patch) | |
| tree | 1f5a821c0b30b4f48dc4b3e8df9be8104a635179 /src/slskd/Application.cs | |
| parent | ee0d568380cdcabee168668c2ba2737077c4d401 (diff) | |
| parent | 891d221e2e9833e2798a294bbdc2e7bdee6fd14a (diff) | |
| download | slskd-eec6e0f098effcb9bfda297a441ca7ffd8d33934.tar.gz | |
Merge pull request #1310 from slskd/search-hanging-maybe
Refactor search logic to help prevent 'hanging' records
Diffstat (limited to 'src/slskd/Application.cs')
| -rw-r--r-- | src/slskd/Application.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index 791cf245..e5681442 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -1258,18 +1258,18 @@ namespace slskd /// <param name="token">The unique token for the request, supplied by the requesting user.</param> /// <param name="directory">The requested directory.</param> /// <returns>A Task resolving an instance of Soulseek.Directory containing the contents of the requested directory.</returns> - private async Task<Soulseek.Directory> DirectoryContentsResponseResolver(string username, IPEndPoint endpoint, int token, string directory) + private async Task<IEnumerable<Soulseek.Directory>> DirectoryContentsResponseResolver(string username, IPEndPoint endpoint, int token, string directory) { if (Users.IsBlacklisted(username, endpoint.Address)) { Log.Information("Returned empty directory listing for blacklisted user {Username} ({IP})", username, endpoint.Address); - return new Soulseek.Directory(directory); + return [new Soulseek.Directory(directory)]; } try { var dir = await Shares.ListDirectoryAsync(directory); - return dir; + return [dir]; } catch (Exception ex) { |
