diff --git a/ChangeLog.txt b/ChangeLog.txt index 7b83dd49..5959289d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -17,6 +17,10 @@ Client features: its subscriptions acknowledged. Use with -c to create a durable client session without requiring a message to be received. +Client fixes: +- mosquitto_pub wouldn't always publish all messages when using `-l` and + QoS>0. This has been fixed. + 1.5.5 - 20181211 ================ diff --git a/client/pub_shared.c b/client/pub_shared.c index 9f10d5ec..9ef50084 100644 --- a/client/pub_shared.c +++ b/client/pub_shared.c @@ -200,7 +200,7 @@ int pub_shared_loop(struct mosquitto *mosq) } } if(feof(stdin)){ - if(last_mid == -1){ + if(mid_sent == -1){ /* Empty file */ mosquitto_disconnect_v5(mosq, 0, cfg.disconnect_props); disconnect_sent = true;