Catch SocketException when listing remote files

This commit is contained in:
Stone_Red
2025-03-03 22:01:05 +01:00
parent e41a9eff45
commit f0b0934b06
@@ -197,11 +197,7 @@ public class HostCommands(HostsManager hostsManager)
ApiManager.SendNotificationMessageNewLine($"Invalid response!", NotificationMessageType.Error);
}
}
catch (SocketException ex)
{
ApiManager.SendNotificationMessageNewLine($"Invalid host! Error message: {ex.Message}", NotificationMessageType.Error);
}
catch (IOException ex)
catch (Exception ex) when (ex is SocketException or IOException or AggregateException)
{
ApiManager.SendNotificationMessageNewLine($"Invalid host! Error message: {ex.Message}", NotificationMessageType.Error);
}