My problem is that I use unity web request for hotfix. 90% of the time, players can perform web reqeust normally. Sometimes you will encounter Error:System.Exception: Code:0 Error:Cannot resolve destination host error. I'm pretty sure that the player's network is fine, because when an error occurs, he sends the event back to my server. I'm also sure that the server of the download source is also fine, because I have passed the cdn of azure and google, and it is unlikely that these two big companies have problems together. Would like to ask if there are any developers who have encountered the same problem, or know how to solve this problem, thank you very much!
public class UnityWebRequestDownloader : AbstractDownloader
{
private static readonly ILog log = LogManager.GetLogger(typeof(UnityWebRequestDownloader));
public UnityWebRequestDownloader(Uri baseUri) : this(baseUri, SystemInfo.processorCount * 2)
{
}
public UnityWebRequestDownloader(Uri baseUri, int maxTaskCount) : base(baseUri, maxTaskCount)
{
}
protected override IEnumerator DoDownloadBundles(IProgressPromise