Fix bug: no need to propagate routing changes back down again

This commit is contained in:
Tony Garnock-Jones 2013-10-26 18:36:58 +01:00
parent e79b0092ed
commit 55a4f0c615
2 changed files with 19 additions and 1 deletions

View File

@ -60,6 +60,24 @@ var g = new Ground(function () {
sub(__, 1)]);
World.send({msg: 'hello outer world'}, 1);
World.send({msg: 'hello inner world'}, 0);
// World.spawn(new World(function () {
// World.spawn({
// boot: function () {
// console.log('w1p1');
// World.updateRoutes([sub('w1p1')]);
// },
// handleEvent: function (e) { console.log('w1p1', e); }
// })
// }))
// World.spawn(new World(function () {
// World.spawn({
// boot: function () {
// console.log('w2p2');
// World.updateRoutes([sub('w2p2')]);
// },
// handleEvent: function (e) { console.log('w2p2', e); }
// })
// }));
},
handleEvent: function (e) {
if (e.type === "send" && e.message[0] === "jQuery") {

View File

@ -391,7 +391,7 @@ World.prototype.handleEvent = function (e) {
switch (e.type) {
case "routes":
this.downwardRoutes = liftRoutes(e.routes);
this.issueRoutingUpdate();
this.eventQueue.push(updateRoutes(this.aggregateRoutes(this.downwardRoutes)));
break;
case "send":
this.eventQueue.push(sendMessage(e.message, e.metaLevel + 1, e.isFeedback));