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

clean up status on close for several core nodes.

This commit is contained in:
Dave Conway-Jones 2016-10-10 11:08:06 +01:00
parent 85b1c1fe97
commit 3a8820397b
4 changed files with 22 additions and 9 deletions

View File

@ -222,6 +222,7 @@ module.exports = function(RED) {
while (node.outstandingIntervals.length > 0) { while (node.outstandingIntervals.length > 0) {
clearInterval(node.outstandingIntervals.pop()) clearInterval(node.outstandingIntervals.pop())
} }
this.status({});
}) })
} catch(err) { } catch(err) {
// eg SyntaxError - which v8 doesn't include line number information // eg SyntaxError - which v8 doesn't include line number information

View File

@ -205,6 +205,10 @@ module.exports = function(RED) {
} }
req.end(); req.end();
}); });
this.on("close",function() {
node.status({});
});
} }
RED.nodes.registerType("http request",HTTPRequest,{ RED.nodes.registerType("http request",HTTPRequest,{

View File

@ -205,11 +205,10 @@ module.exports = function(RED) {
} else { } else {
this.error(RED._("websocket.errors.missing-conf")); this.error(RED._("websocket.errors.missing-conf"));
} }
this.on('close', function() { this.on('close', function() {
node.serverConfig.removeInputNode(node); node.serverConfig.removeInputNode(node);
node.status({});
}); });
} }
RED.nodes.registerType("websocket in",WebSocketInNode); RED.nodes.registerType("websocket in",WebSocketInNode);
@ -252,6 +251,9 @@ module.exports = function(RED) {
} }
} }
}); });
this.on('close', function() {
node.status({});
});
} }
RED.nodes.registerType("websocket out",WebSocketOutNode); RED.nodes.registerType("websocket out",WebSocketOutNode);
} }

View File

@ -91,6 +91,9 @@ module.exports = function(RED) {
} }
} }
}); });
this.on('close', function() {
node.status({});
});
} }
RED.nodes.registerType("file",FileNode); RED.nodes.registerType("file",FileNode);
@ -127,6 +130,9 @@ module.exports = function(RED) {
}); });
} }
}); });
this.on('close', function() {
node.status({});
});
} }
RED.nodes.registerType("file in",FileInNode); RED.nodes.registerType("file in",FileInNode);
} }