try to protect websocket slightly

This commit is contained in:
Dave Conway-Jones 2020-06-04 16:34:00 +01:00
parent 6bce963ba9
commit 5f8c6c3658
No known key found for this signature in database
GPG Key ID: 302A6725C594817F

View File

@ -58,6 +58,7 @@ module.exports = function(RED) {
// RED.httpNode.use(node.path, express.static(__dirname + '/worldmap', {maxage:3600000}));
var callback = function(client) {
if (!client.headers.hasOwnProperty("user-agent")) { client.close(); }
//client.setMaxListeners(0);
clients[client.id] = client;
client.on('data', function(message) {