Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT module has static DNS handling #2987

Closed
nwf opened this issue Dec 29, 2019 · 1 comment
Closed

MQTT module has static DNS handling #2987

nwf opened this issue Dec 29, 2019 · 1 comment

Comments

@nwf
Copy link
Member

nwf commented Dec 29, 2019

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.)

@nwf
Copy link
Member Author

nwf commented Jan 4, 2021

Worked around, sort of, mostly, by part of #3360. See #3063 for motion against removing DNS handling from C and workaround adopted in TLS. However, at the time of this writing the refcount work necessary has not been done and so mqtt remains a source of badness.

@nodemcu nodemcu deleted a comment from stale bot Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants