mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
5179cc77f5
commit
c079576e49
@ -75,10 +75,12 @@ module.exports = function(RED) {
|
|||||||
// Workaround https://github.com/einaros/ws/pull/253
|
// Workaround https://github.com/einaros/ws/pull/253
|
||||||
// Remove listeners from RED.server
|
// Remove listeners from RED.server
|
||||||
var listener = null;
|
var listener = null;
|
||||||
for (var event = 0; event < node._serverListeners.length; event++) {
|
for(var event in node._serverListeners) {
|
||||||
listener = node._serverListeners[event];
|
if (node._serverListeners.hasOwnProperty(event)) {
|
||||||
if(typeof listener === "function"){
|
listener = node._serverListeners[event];
|
||||||
RED.server.removeListener(event,listener);
|
if(typeof listener === "function"){
|
||||||
|
RED.server.removeListener(event,listener);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
node._serverListeners = {};
|
node._serverListeners = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user