From aba8a189007057bb9a3fdc5ce9a17ec4b5a2caac Mon Sep 17 00:00:00 2001 From: fuzhongyun <15339891972@163.com> Date: Thu, 27 Nov 2025 15:35:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BF=98=E5=8E=9F=E5=BE=AA=E7=8E=AF?= =?UTF-8?q?=E6=8C=82=E8=B5=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/tools_bot/bug_optimization_submit.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/internal/tools_bot/bug_optimization_submit.go b/internal/tools_bot/bug_optimization_submit.go index 71b7dd7..1bb2d31 100644 --- a/internal/tools_bot/bug_optimization_submit.go +++ b/internal/tools_bot/bug_optimization_submit.go @@ -8,6 +8,7 @@ import ( "context" "encoding/json" "fmt" + "time" "github.com/gofiber/fiber/v2/log" "github.com/google/uuid" @@ -78,6 +79,16 @@ func (w *BotTool) BugOptimizationSubmit(ctx context.Context, requireData *entity entitys.ResLog(requireData.Ch, requireData.Match.Index, "问题记录中") entitys.ResLoading(requireData.Ch, requireData.Match.Index, "问题记录中...") + // 等待异步回调完成再结束 + for { + sessionID, ok := w.GetSessionByTaskID(body.TaskId) + if !ok || sessionID != requireData.Session { + break + } + + time.Sleep(time.Second * 2) + } + return }