promise ( i don't think does anything?)

This commit is contained in:
Chayapak 2024-10-19 17:59:11 +07:00
parent 403a9613b6
commit 6df2ef5f0c

View file

@ -71,6 +71,7 @@ io.on('connection', async (socket) => {
resetVM()
socket.on('runCode', async (transactionId, code) => {
new Promise(() => {
try {
const output = vm.run(code)
@ -79,6 +80,7 @@ io.on('connection', async (socket) => {
socket.emit('codeOutput', transactionId, true, e.toString())
}
})
})
socket.on('reset', resetVM)
})