From e7fd86b1e242fbc099f519b3c5b9ed38d31466f2 Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 19 Jan 2023 10:38:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E5=8F=AF=E6=8C=81=E7=BB=AD?= =?UTF-8?q?=E6=80=A7=E7=9A=84=E7=AB=AD=E6=B3=BD=E8=80=8C=E6=B8=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/websocket/custom/getZip.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/websocket/custom/getZip.js b/src/websocket/custom/getZip.js index fa1c96f..d84dea8 100644 --- a/src/websocket/custom/getZip.js +++ b/src/websocket/custom/getZip.js @@ -3,7 +3,7 @@ const execute = require("../../tools/exec") const dayjs = require("dayjs") const fse = require("fs-extra"); -const controller = new AbortController() +let controller = new AbortController() const handleZip = (id, ws) => { const uniCon = `id='${id}'` const sendMessage = data => ws.send(JSON.stringify(data)) @@ -85,6 +85,7 @@ module.exports = { const data = JSON.parse(res.data) if (data.cid == id) { controller.abort() + controller = new AbortController() } else if (id == data.id) { handleZip(id, ws) }