From 3a5491550d637715b4d199c37d9d1c7be46e0953 Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Wed, 7 Aug 2019 10:21:21 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=E5=8F=AA=E5=9C=A8=E6=B5=8B=E8=AF=84?= =?UTF-8?q?=E6=97=B6=E8=A7=A6=E5=8F=91socket?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/submission.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/submission.js b/modules/submission.js index 2034d8b..f916f5c 100644 --- a/modules/submission.js +++ b/modules/submission.js @@ -293,7 +293,7 @@ app.get('/submission/:id', async (req, res) => { formattedCode: judge.formattedCode ? judge.formattedCode.toString("utf8") : null, preferFormattedCode: res.locals.user ? res.locals.user.prefer_formatted_code : true, detailResult: processOverallResult(judge.result, currentConfig), - socketToken: (judge.task_id != null) ? jwt.sign({ + socketToken: (judge.pending && judge.task_id != null) ? jwt.sign({ taskId: judge.task_id, type: 'detail', displayConfig: displayConfig