Skip to content

Commit

Permalink
Fix mosquitto_pub -l hang when stdin stream ends. Closes eclipse#1448.
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Wodzinski <[email protected]>
  • Loading branch information
majekw committed Oct 6, 2019
1 parent cfacd96 commit 7a5912f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog.txt
Expand Up @@ -12,6 +12,9 @@ Client library:
- Fix publish properties not being passed to on_message_v5 callback for QoS 2
messages. Closes #1432.

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


1.6.7 - 20190925
================
Expand Down
3 changes: 2 additions & 1 deletion client/pub_client.c
Expand Up @@ -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;
Expand Down

0 comments on commit 7a5912f

Please sign in to comment.