From ce7bf78349381f431e8dcce93cd92d82aa7dccdf Mon Sep 17 00:00:00 2001 From: Nicholas O'Leary Date: Thu, 5 Dec 2013 14:39:26 +0000 Subject: [PATCH] Non-Cloning of req/res properties caused them to be lost The previous fix to not clone the req/res objects introduced a bug where the req/res objects were lost from all but the first clone made out of a particular node. --- red/nodes.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/red/nodes.js b/red/nodes.js index 0eb50f352..c517c60aa 100644 --- a/red/nodes.js +++ b/red/nodes.js @@ -175,11 +175,13 @@ Node.prototype.send = function(msg) { // TODO: remove this http-node-specific fix somehow var req = mm.req; var res = mm.res; - mm.req = null; - mm.res = null; + delete mm.req; + delete mm.res; var m = clone(mm); m.req = req; m.res = res; + mm.req = req; + mm.res = res; node.receive(m); } }