Skip to content

Fix: Fixed IOException in QuickLookProvider #14509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.Core.Services;
using Microsoft.Extensions.Logging;
using System.IO;
using System.IO.Pipes;
Expand Down Expand Up @@ -41,9 +40,9 @@ private async Task DoPreviewAsync(string path, string message)
await writer.WriteLineAsync($"{message}|{path}");
await writer.FlushAsync();
}
catch (TimeoutException)
catch (Exception ex) when (ex is TimeoutException or IOException)
{
client.Close();
// ignore
}
}

Expand All @@ -63,9 +62,8 @@ async Task<int> QuickLookServerAvailable()

return serverInstances;
}
catch (TimeoutException)
catch (Exception ex) when (ex is TimeoutException or IOException)
{
client.Close();
return 0;
}
}
Expand Down