diff options
Diffstat (limited to 'editors/vscode/client/wasmproc.js')
| -rw-r--r-- | editors/vscode/client/wasmproc.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/editors/vscode/client/wasmproc.js b/editors/vscode/client/wasmproc.js index 0aa674a..e8250bc 100644 --- a/editors/vscode/client/wasmproc.js +++ b/editors/vscode/client/wasmproc.js @@ -58,6 +58,9 @@ function wasmProcess(file, opts = {}) { dead = true; log(status === 0 ? 'message' : 'problem', 'the server halted with status ' + status + ' after ' + steps + ' steps, ' + bytesIn + ' bytes in, ' + bytesOut + ' out'); proc.emit('exit', status); + } else if (status === 3 && x.wasm_polling && x.wasm_polling()) { + // the server asked whether input is waiting: let the event loop deliver it, then go on + setImmediate(() => { if (!dead && x.wasm_polling && x.wasm_polling()) after(x.wasm_resume()); }); } }; |
