Skip to content

Commit

Permalink
Merge branch 'stdin-fix-1' of git:https://github.com/majekw/mosquitto into …
Browse files Browse the repository at this point in the history
…majekw-stdin-fix-1
  • Loading branch information
ralight committed Nov 6, 2019
2 parents aabf850 + 50c9a4b commit 22eb193
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Client library:

Clients:
- Fix duplicate cfg definition in rr_client. Closes #1453.
- Fix `mosquitto_pub -l` hang when stdin stream ends. Closes #1448.

Installer:
- Fix mosquitto_rr.exe not being included in Windows installers. Closes #1463.
Expand Down
4 changes: 3 additions & 1 deletion client/pub_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ int pub_stdin_line_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 22eb193

Please sign in to comment.