promise ( i don't think does anything?)
This commit is contained in:
parent
403a9613b6
commit
6df2ef5f0c
1 changed files with 8 additions and 6 deletions
2
index.js
2
index.js
|
@ -71,6 +71,7 @@ io.on('connection', async (socket) => {
|
||||||
resetVM()
|
resetVM()
|
||||||
|
|
||||||
socket.on('runCode', async (transactionId, code) => {
|
socket.on('runCode', async (transactionId, code) => {
|
||||||
|
new Promise(() => {
|
||||||
try {
|
try {
|
||||||
const output = vm.run(code)
|
const output = vm.run(code)
|
||||||
|
|
||||||
|
@ -79,6 +80,7 @@ io.on('connection', async (socket) => {
|
||||||
socket.emit('codeOutput', transactionId, true, e.toString())
|
socket.emit('codeOutput', transactionId, true, e.toString())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
|
||||||
socket.on('reset', resetVM)
|
socket.on('reset', resetVM)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue