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

Regression: Zero length input using --stdin-line not handled properly #1302

Closed
marwatk opened this issue Jun 2, 2019 · 4 comments
Closed

Comments

@marwatk
Copy link

marwatk commented Jun 2, 2019

Looks like #676 has cropped back up. It works fine with 1.5.3 but not 1.6.2:

root@softwareradio:~# mosquitto_pub --help | head -2
mosquitto_pub is a simple mqtt client that will publish a message on a single topic and exit.
mosquitto_pub version 1.6.2 running on libmosquitto 1.6.2.

root@softwareradio:~# dd if=/dev/zero count=0 | mosquitto_pub --stdin-line --topic sensors/433_raw --host <redacted> --port 1883 -d
0+0 records in
0+0 records out
0 bytes copied, 0.00390834 s, 0.0 kB/s
Client mosq/sCYUoZnobu8Y2A3y5a sending CONNECT
Client mosq/sCYUoZnobu8Y2A3y5a received CONNACK (0)

Here's with 1.5.3:

0+0 records in
0+0 records out
0 bytes copied, 0.0366094 s, 0.0 kB/s
Client mosqpub|11313-softwarer sending CONNECT
Client mosqpub|11313-softwarer received CONNACK (0)
Client mosqpub|11313-softwarer sending DISCONNECT
@ralight
Copy link
Contributor

ralight commented Jun 3, 2019

Are you able to check with the fixes branch? There was a -l related fix there already. I'm on holiday right now so it's tricky to check myself at the moment.

@ralight
Copy link
Contributor

ralight commented Jun 6, 2019

A fix is in the fixes branch now, I'm not entirely sure about other behaviour though.

@marwatk
Copy link
Author

marwatk commented Jun 6, 2019 via email

@ralight
Copy link
Contributor

ralight commented Jun 6, 2019

The fix is related to a previous commit that was fixing some -l messages not being sent at QoS > 0. I think it was just the final message not being sent. It all looks fine to me, but if you are able to confirm you get the behaviour you expect it would be nice to hear.

vankxr pushed a commit to vankxr/mosquitto that referenced this issue Aug 9, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 16, 2019
ralight added a commit that referenced this issue Sep 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants