Skip to content

MQTTS connection error on nodejs >= 8.6.0 #699

Description

@redboltz

After updating nodejs from 8.5.0 to 8.6.0, MQTTS connection becomes failure.

The reason is the commit nodejs/node@ee157e5a7f
See https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#8.6.0

Here is the document.
https://nodejs.org/api/tls.html#tls_tls_connect_options_callback

"path Creates unix socket connection to path. If this option is specified, host and port are ignored."

I analyzed the problem. And
https://github.com/mqttjs/MQTT.js/blob/master/lib/connect/index.js#L60 adds path member.

And the variable opt that contains path member passed to https://github.com/mqttjs/MQTT.js/blob/master/lib/connect/tls.js#L11

Hence host and port are ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions