解除async的闭包
This commit is contained in:
parent
37b00d8d17
commit
10a871fb20
|
@ -79,7 +79,7 @@ async function publish() {
|
||||||
if (i >= list.length) i = 0
|
if (i >= list.length) i = 0
|
||||||
return list[i]
|
return list[i]
|
||||||
}
|
}
|
||||||
;(async () => {
|
|
||||||
let exit = false
|
let exit = false
|
||||||
jobCancel.value = () => {
|
jobCancel.value = () => {
|
||||||
exit = true
|
exit = true
|
||||||
|
@ -109,7 +109,6 @@ async function publish() {
|
||||||
const json = JSON.stringify(item)
|
const json = JSON.stringify(item)
|
||||||
mqttClient!.publish(topic, json, {})
|
mqttClient!.publish(topic, json, {})
|
||||||
}, 100)
|
}, 100)
|
||||||
})().catch((e) => console.error(e))
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user