robinrodricks / FluentFTP

An FTP and FTPS client for .NET & .NET Standard, optimized for speed. Provides extensive FTP commands, File uploads/downloads, SSL/TLS connections, Automatic directory listing parsing, File hashing/checksums, File permissions/CHMOD, FTP proxies, FXP support, UTF-8 support, Async/await support, Powershell support and more. Written entirely in C#.
MIT License
3.14k stars 657 forks source link

Issue Fix #1634 #1637

Closed FanDjango closed 3 months ago

FanDjango commented 3 months ago

Replace DisposeAsync().ConfigureAwait(false).GetAwaiter().GetResult(); by Task.Run(async () => await DisposeAsync()).Wait();.

In a GUI environment the preferred way to invoke an async routine from a sync method is prone to deadlocks.

This way is safer.