no more stack overflow from recursive sends
parent
4b975d2af5
commit
e24d7cf56e
|
|
@ -17,10 +17,17 @@ module.exports.Entity = class Entity {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperty(this.instance, 'send', {
|
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() {
|
start() {
|
||||||
this.systemPtr.send('start', this.instanceData._id);
|
this.systemPtr.send('start', this.instanceData._id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue