diff --git a/src/daemon-frontend-syzoj/socketio.ts b/src/daemon-frontend-syzoj/socketio.ts index 408491c..c9cd7c9 100644 --- a/src/daemon-frontend-syzoj/socketio.ts +++ b/src/daemon-frontend-syzoj/socketio.ts @@ -189,19 +189,20 @@ export function initializeSocketIO(s: http.Server) { roughProgressNamespace = initializeNamespace('rough', async (req, socket) => { const taskId = req.taskId; - if (currentJudgeList[taskId]) { - return { - ok: true, - running: true, - finished: false - }; - } else if (finishedJudgeList[taskId]) { + if (finishedJudgeList[taskId]) { return { ok: true, running: false, finished: true, result: processRoughResult(finishedJudgeList[taskId], clientDisplayConfigList[socket.id]) }; + } + else if (currentJudgeList[taskId]) { + return { + ok: true, + running: true, + finished: false + }; } else { return { ok: true,