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

Move receive metric position to better reflect async changes

Fixes #2444
This commit is contained in:
Nick O'Leary 2020-02-07 16:49:41 +00:00
parent a05589c5a6
commit 80d100f3f9
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -193,6 +193,7 @@ Node.prototype.emit = function(event, ...args) {
*/ */
Node.prototype._emitInput = function(arg) { Node.prototype._emitInput = function(arg) {
var node = this; var node = this;
this.metric("receive", arg);
if (node._inputCallback) { if (node._inputCallback) {
// Just one callback registered. // Just one callback registered.
try { try {
@ -448,7 +449,6 @@ Node.prototype.receive = function(msg) {
if (!msg._msgid) { if (!msg._msgid) {
msg._msgid = redUtil.generateId(); msg._msgid = redUtil.generateId();
} }
this.metric("receive",msg);
this.emit("input",msg); this.emit("input",msg);
}; };