继续可持续性的竭泽而渔
This commit is contained in:
@@ -3,7 +3,7 @@ const execute = require("../../tools/exec")
|
|||||||
const dayjs = require("dayjs")
|
const dayjs = require("dayjs")
|
||||||
const fse = require("fs-extra");
|
const fse = require("fs-extra");
|
||||||
|
|
||||||
const controller = new AbortController()
|
let controller = new AbortController()
|
||||||
const handleZip = (id, ws) => {
|
const handleZip = (id, ws) => {
|
||||||
const uniCon = `id='${id}'`
|
const uniCon = `id='${id}'`
|
||||||
const sendMessage = data => ws.send(JSON.stringify(data))
|
const sendMessage = data => ws.send(JSON.stringify(data))
|
||||||
@@ -85,6 +85,7 @@ module.exports = {
|
|||||||
const data = JSON.parse(res.data)
|
const data = JSON.parse(res.data)
|
||||||
if (data.cid == id) {
|
if (data.cid == id) {
|
||||||
controller.abort()
|
controller.abort()
|
||||||
|
controller = new AbortController()
|
||||||
} else if (id == data.id) {
|
} else if (id == data.id) {
|
||||||
handleZip(id, ws)
|
handleZip(id, ws)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user