diff --git a/core/entity.js b/core/entity.js index 6da7c5b..041daec 100644 --- a/core/entity.js +++ b/core/entity.js @@ -17,10 +17,17 @@ module.exports.Entity = class Entity { } }); Object.defineProperty(this.instance, 'send', { - value: systemPtr.send.bind(systemPtr) + value: ((name, destination, options) => { + //anti call stack measure + setTimeout(_ => { + this.systemPtr.send(name, destination, options); + }, 0) + }).bind(that) }); } + + start() { this.systemPtr.send('start', this.instanceData._id); }