Skip to content

Undefined node and options in addMsg #27

@Beetix

Description

@Beetix

Hi,

There is a bug when using TLS. node and options variables are not defined in the addMsg function:

if (this.serverConfig.ssl && this.serverConfig.tls) {
var tlsNode = RED.nodes.getNode(node.serverConfig.tls);
if (tlsNode) {
tlsNode.addTLSOptions(options);
}
}

It's seems to be a copy/paste from startconn:
var options = {};
if (agent) {
options.agent = agent;
}
if (node.serverConfig.ssl && node.serverConfig.tls) {
var tlsNode = RED.nodes.getNode(node.serverConfig.tls);
if (tlsNode) {
tlsNode.addTLSOptions(options);
}
}

Removing lines 194-199 in node-handlers.js fixes the problem. If I understand correctly this code is useful when using a proxy, right?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions