mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Do not dynamically add/remove upgrade listener in ws nodes
The way we dynamically added/removed event handlers for the upgrade event was causing problems with the way sockjs (as used by the worldmap node) tries to intercept the event. This fix means the ws nodes won't ever remove the upgrade listener - it gets added once when the first ws node is deployed and will then remain until the last ws node is removed and the runtime restarted.
This commit is contained in:
parent
ee6c6266cc
commit
a3cbe80a36
@ -141,10 +141,10 @@ module.exports = function(RED) {
|
||||
node.server.close();
|
||||
node._inputNodes = [];
|
||||
activeListenerNodes--;
|
||||
if (activeListenerNodes === 0 && serverUpgradeAdded) {
|
||||
RED.server.removeListener('upgrade', handleServerUpgrade);
|
||||
serverUpgradeAdded = false;
|
||||
}
|
||||
// if (activeListenerNodes === 0 && serverUpgradeAdded) {
|
||||
// RED.server.removeListener('upgrade', handleServerUpgrade);
|
||||
// serverUpgradeAdded = false;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user