ae
This commit is contained in:
parent
a3ab6e672f
commit
3d34ad6fea
1 changed files with 5 additions and 1 deletions
6
index.js
6
index.js
|
@ -12,6 +12,8 @@ io.on('connection', (socket) => {
|
|||
|
||||
let isFirst = true
|
||||
|
||||
let jsonArray
|
||||
|
||||
function reset () {
|
||||
worker = new Worker(path.join(__dirname, 'vm.js'))
|
||||
|
||||
|
@ -36,7 +38,9 @@ io.on('connection', (socket) => {
|
|||
|
||||
reset()
|
||||
|
||||
socket.on('setFunctions', (jsonArray) => {
|
||||
socket.on('setFunctions', (_jsonArray) => {
|
||||
jsonArray = _jsonArray
|
||||
|
||||
worker.postMessage({ type: 'setFunctions', jsonArray })
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue