Skip to content

Commit

Permalink
Merge pull request #115 from 4censord/4c/fix-warnings
Browse files Browse the repository at this point in the history
fix warnings
  • Loading branch information
KoalaBear84 authored Jun 13, 2022
2 parents e538c15 + 296e6d0 commit 4db985b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/OpenDirectoryDownloader/Library.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,13 @@ public static async Task<SpeedtestResult> 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);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@ private static async Task<WebDirectory> ScanAsync(HttpClient httpClient, WebDire
//throw;
}

return webDirectory;
return await Task.FromResult(webDirectory);
}
}

0 comments on commit 4db985b

Please sign in to comment.