Skip to content

MQTT module has static DNS handling #2987

@nwf

Description

@nwf

The MQTT module nominally can juggle multiple clients, each with an associated lightuserdata object, and yet it contains "static ip_addr_t host_ip; // for dns". So in practice it can only be doing one DNS resolution at once and may end up crisscrossing resolution results between multiple client objects.

I think I would like to make a breaking change to the C module: no DNS support for the hostname. We can (I will) provide a Lua wrapper that does DNS resolution and hands the address down to the mqtt module. (As with #2819, I want to keep the C as simple as possible; for MQTT, keeping the state machine in C is fine, I guess, since it's already there and working.)

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