Closed semicolonTransistor closed 1 year ago
Assuming an MQTT broker is set up on localhost at port 1883, running the following snipping will hang.
publish.multiple( msgs=[], )
I have not been quite able to pinpoint why this happens, it seems likely due to _on_publish never being called, and the client is never disconnected.
_on_publish
If this is unintentional, I'd suggest adding an else clause to the check for len(userdata) > 0 in _on_connect and disconnecting the client there.
len(userdata) > 0
_on_connect
If this is indeed the intended behavior, could the documentation be made clearer on it?
Thanks!
Thank you, this case will now raise a ValueError - it shouldn't be allowed. It will be in the next release.
Assuming an MQTT broker is set up on localhost at port 1883, running the following snipping will hang.
I have not been quite able to pinpoint why this happens, it seems likely due to
_on_publish
never being called, and the client is never disconnected.If this is unintentional, I'd suggest adding an else clause to the check for
len(userdata) > 0
in_on_connect
and disconnecting the client there.If this is indeed the intended behavior, could the documentation be made clearer on it?
Thanks!