mosquitto_sub with -C and -W options
gsaviane opened this issue · comments
Running the following command over a mosquitto 2.0.11 installation
mosquitto_sub -h host -p port -t topic -C 1 and -W 10
waits for the timeout to expire whether or not a message is read. Since the -C option says:
Disconnect and exit the program immediately after the given count of messages have been received. This may be useful in shell scripts where on a single status value is required, for example.
I would expect that the timeout takes place only when there are no messages in the topic, and it is ignored when a message is actually read, respecting the -C specs.
can you try with a newer version?
This works on 2.0.18, unless i misunderstood something.