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()
|
||||
|
||||
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)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue