diff --git a/src/OpenDirectoryDownloader/Library.cs b/src/OpenDirectoryDownloader/Library.cs index 549430f2..5987d618 100644 --- a/src/OpenDirectoryDownloader/Library.cs +++ b/src/OpenDirectoryDownloader/Library.cs @@ -216,12 +216,13 @@ public static async Task DoSpeedTestFtpAsync(FtpClient ftpClien Logger.Info($"Do FTP speedtest for {url}"); Uri uri = new Uri(url); - - using (Stream stream = await ftpClient.OpenReadAsync(uri.LocalPath)) + #pragma warning disable CS0618 // Discussion about `OpenRead` https://github.com/robinrodricks/FluentFTP/issues/841 + using (Stream stream = ftpClient.OpenRead(uri.LocalPath)) + #pragma warning restore CS0618 { SpeedtestResult speedtestResult = SpeedtestFromStream(stream, seconds); - return speedtestResult; + return await Task.FromResult(speedtestResult); } } diff --git a/src/OpenDirectoryDownloader/Site/Pixeldrain/PixeldrainParser.cs b/src/OpenDirectoryDownloader/Site/Pixeldrain/PixeldrainParser.cs index 3f4f27e0..30b52760 100644 --- a/src/OpenDirectoryDownloader/Site/Pixeldrain/PixeldrainParser.cs +++ b/src/OpenDirectoryDownloader/Site/Pixeldrain/PixeldrainParser.cs @@ -117,6 +117,6 @@ private static async Task ScanAsync(HttpClient httpClient, WebDire //throw; } - return webDirectory; + return await Task.FromResult(webDirectory); } }