Fix `mosquitto_pub -l` hang when stdin stream ends. Closes #1448.

Signed-off-by: Marek Wodzinski <majek@w7i.pl>
pull/1449/head
majekw 6 years ago committed by Marek Wodzinski
parent 8a4ae28fa9
commit 50c9a4b0b0

@ -14,6 +14,7 @@ Client library:
Clients:
- Fix duplicate cfg definition in rr_client. Closes #1453.
- Fix `mosquitto_pub -l` hang when stdin stream ends. Closes #1448.
1.6.7 - 20190925

@ -283,7 +283,8 @@ int pub_shared_loop(struct mosquitto *mosq)
/* Not end of stdin, so we've lost our connection and must
* reconnect */
}
}else if(status == STATUS_WAITING){
}
if(status == STATUS_WAITING){
if(last_mid_sent == last_mid && disconnect_sent == false){
mosquitto_disconnect_v5(mosq, 0, cfg.disconnect_props);
disconnect_sent = true;

Loading…
Cancel
Save