axihttp DNS线程安全

This commit is contained in:
sin365 2025-08-20 15:22:02 +08:00
parent 2356fd7448
commit 224e0d1126

View File

@ -165,6 +165,8 @@ public static class AxiHttp
} }
public static IPAddress GetDnsIP(string str) public static IPAddress GetDnsIP(string str)
{
lock (dictIP2Address)
{ {
if (!dictIP2Address.ContainsKey(str)) if (!dictIP2Address.ContainsKey(str))
{ {
@ -181,6 +183,7 @@ public static class AxiHttp
} }
return dictIP2Address[str]; return dictIP2Address[str];
} }
}
public enum AxiDownLoadMode public enum AxiDownLoadMode
{ {