From a9c610e79f21d9b24a0d60182519f9907ae24ee2 Mon Sep 17 00:00:00 2001 From: hardstylewyl <827778732@qq.com> Date: Thu, 19 Jun 2025 16:30:10 +0800 Subject: [PATCH] =?UTF-8?q?perf:=E6=96=B0=E5=A2=9E/=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=BD=A8=E8=BF=B9=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99=E7=9A=84?= =?UTF-8?q?=E6=9C=80=E5=90=8E=E4=B8=80=E6=AC=A1=E5=BB=B6=E6=97=B6,?= =?UTF-8?q?=E6=8F=90=E5=8D=87=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/ProvideServices/TrackService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SJZY.Track.Application/Services/ProvideServices/TrackService.cs b/src/SJZY.Track.Application/Services/ProvideServices/TrackService.cs index dd4d3b9f..fdbe5fd0 100644 --- a/src/SJZY.Track.Application/Services/ProvideServices/TrackService.cs +++ b/src/SJZY.Track.Application/Services/ProvideServices/TrackService.cs @@ -606,7 +606,9 @@ public partial class TrackService : ApplicationService, ITrackService return tracks; //指数退避等待 var delay = TimeSpan.FromMilliseconds(Math.Pow(2, curRetryCount) * 150); // 150ms, 300ms, 600ms, ... - await Task.Delay(delay); + // 可以执行下一次才延时,否则延时没意义 + if (curRetryCount + 1 < GlobalConst.MaxUpdateTrackRetryCount) + await Task.Delay(delay); } finally {