IgnitionModuleDevelopmentCommunity / IgnitionNode-RED

Adds support for Node-RED
Apache License 2.0
31 stars 7 forks source link

Undefined node and options in addMsg #27

Closed Beetix closed 2 years ago

Beetix commented 2 years ago

Hi,

There is a bug when using TLS. node and options variables are not defined in the addMsg function: https://github.com/IgnitionModuleDevelopmentCommunity/IgnitionNode-RED/blob/3a52c20d69b78f1b5f6e4847873258666cd74bb7/node-red-contrib-ignition/node-handlers.js#L194-L199 It's seems to be a copy/paste from startconn: https://github.com/IgnitionModuleDevelopmentCommunity/IgnitionNode-RED/blob/3a52c20d69b78f1b5f6e4847873258666cd74bb7/node-red-contrib-ignition/node-handlers.js#L395-L405 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

iatraviscox commented 2 years ago

That was a copy paste issue. I have released a new version with the fix.

Beetix commented 2 years ago

Great! Thank you for fixing that so quickly!