You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When mosquitto_pub is run in stdin-line mode (with -l switch), then it does not recognize EOF in case of zero-length input.
I am using v1.4.14
$ LD_LIBRARY_PATH=$(pwd)/lib client/mosquitto_pub --help | head -n 2
mosquitto_pub is a simple mqtt client that will publish a message on a single topic and exit.
mosquitto_pub version 1.4.14 running on libmosquitto 1.4.14.
The command that hangs up is:
$ LC_ALL=en_US dd if=/dev/zero count=0 | LD_LIBRARY_PATH=$(pwd)/lib client/mosquitto_pub -h iot.eclipse.org -t test/topic -d -l
0+0 records in
0+0 records out
0 bytes copied, 4.8251e-05 s, 0.0 kB/s
Client mosqpub|11199-home-pc sending CONNECT
Client mosqpub|11199-home-pc received CONNACK
I expect the mosquitto_pub -l to behave in this regard the same as mosquitto_pub -s:
$ LC_ALL=en_US dd if=/dev/zero count=0 | LD_LIBRARY_PATH=$(pwd)/lib client/mosquitto_pub -h iot.eclipse.org -t test/topic -d -s
0+0 records in
0+0 records out
0 bytes copied, 5.2439e-05 s, 0.0 kB/s
Error: Zero length input.
Error loading input from stdin.
The text was updated successfully, but these errors were encountered:
I've upgraded to 1.6.2 and I still seem to see this behavior:
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)
Is there a known good version I can test against to see if it's a regression?
When
mosquitto_pub
is run instdin-line
mode (with-l
switch), then it does not recognize EOF in case of zero-length input.I am using v1.4.14
The command that hangs up is:
I expect the
mosquitto_pub -l
to behave in this regard the same asmosquitto_pub -s
:The text was updated successfully, but these errors were encountered: