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

Paho.mqtt.publish.multiple hangs if given an empty list of messages #684

Closed
semicolonTransistor opened this issue Oct 26, 2022 · 1 comment
Labels
Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug

Comments

@semicolonTransistor
Copy link

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.

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!

@github-actions github-actions bot added the Status: Available No one has claimed responsibility for resolving this issue. label Oct 26, 2022
@ralight ralight added Type: Bug Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. and removed Status: Available No one has claimed responsibility for resolving this issue. labels Jan 20, 2023
@ralight
Copy link
Contributor

ralight commented Jan 20, 2023

Thank you, this case will now raise a ValueError - it shouldn't be allowed. It will be in the next release.

@ralight ralight closed this as completed Jan 20, 2023
ralight added a commit that referenced this issue Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants