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) }