fix: clear DNS Cache wont clean system dns cache

This commit is contained in:
ChsBuffer
2020-11-05 15:41:05 +08:00
parent a4f024df69
commit cfc070b1ef

View File

@@ -235,7 +235,12 @@ namespace Netch.Forms
{
try
{
await Task.Run(() => DNS.Cache.Clear());
await Task.Run(() =>
{
NativeMethods.FlushDNSResolverCache();
DNS.Cache.Clear();
});
StatusText(i18N.Translate("DNS cache cleanup succeeded"));
}
catch (Exception)