From da102248de15cadb5e7e12c7d7a5f34c6b99ab2e Mon Sep 17 00:00:00 2001 From: zensyue Date: Tue, 2 Apr 2024 01:58:31 +0800 Subject: [PATCH] DownloaderBase CheckTimeout bug fix --- .../Runtime/DownloadSystem/Downloader/DownloaderBase.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/YooAsset/Runtime/DownloadSystem/Downloader/DownloaderBase.cs b/Assets/YooAsset/Runtime/DownloadSystem/Downloader/DownloaderBase.cs index df531d5b..de185d62 100644 --- a/Assets/YooAsset/Runtime/DownloadSystem/Downloader/DownloaderBase.cs +++ b/Assets/YooAsset/Runtime/DownloadSystem/Downloader/DownloaderBase.cs @@ -162,7 +162,7 @@ namespace YooAsset // 注意:在连续时间段内无新增下载数据及判定为超时 if (_isAbort == false) { - if (_latestDownloadBytes != DownloadedBytes) + if (_latestDownloadBytes != DownloadedBytes || _latestDownloadRealtime == 0) { _latestDownloadBytes = DownloadedBytes; _latestDownloadRealtime = Time.realtimeSinceStartup; @@ -172,6 +172,7 @@ namespace YooAsset if (offset > _timeout) { YooLogger.Warning($"Web file request timeout : {_requestURL}"); + _latestDownloadRealtime = 0; if (_requester != null) _requester.Abort(); _isAbort = true;