diff --git a/src/lib/Messages.js b/src/lib/Messages.js index fc7df6a..a58598a 100644 --- a/src/lib/Messages.js +++ b/src/lib/Messages.js @@ -2,6 +2,7 @@ { let handlers = new Set(); + let forever = new Promise(resolve => {}); let dispatch = async (msg, sender) => { let {_messageName} = msg; for (let h of handlers) { @@ -10,6 +11,7 @@ return await f(msg, sender); } } + await forever; }; var Messages = {