1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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.
This commit is contained in:
Nicholas O'Leary 2013-12-05 14:39:26 +00:00
parent 5767478871
commit ce7bf78349

View File

@ -175,11 +175,13 @@ Node.prototype.send = function(msg) {
// TODO: remove this http-node-specific fix somehow // TODO: remove this http-node-specific fix somehow
var req = mm.req; var req = mm.req;
var res = mm.res; var res = mm.res;
mm.req = null; delete mm.req;
mm.res = null; delete mm.res;
var m = clone(mm); var m = clone(mm);
m.req = req; m.req = req;
m.res = res; m.res = res;
mm.req = req;
mm.res = res;
node.receive(m); node.receive(m);
} }
} }