Skip to content

Commit

Permalink
Fix bridge not reconnectng if the first reconnection attempt fails.
Browse files Browse the repository at this point in the history
Closes #2207. Thanks to Abilio Marques.
  • Loading branch information
ralight committed May 16, 2021
1 parent 9bb58a8 commit 880df73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Broker:
- Fix possible crash having just upgraded from 1.6 if `per_listener_settings
true` is set, and a SIGHUP is sent to the broker before a client has
reconnected to the broker. Closes #2167.
- Fix bridge not reconnectng if the first reconnection attempt fails.
Closes #2207.

Clients:
- If sending mosquitto_sub output to a pipe, mosquitto_sub will now detect
Expand Down
2 changes: 1 addition & 1 deletion src/bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ void bridge_check(void)
{
rc = bridge__connect(context);
context->bridge->restart_t = 0;
if(rc == MOSQ_ERR_SUCCESS){
if(rc == MOSQ_ERR_SUCCESS || rc == MOSQ_ERR_CONN_PENDING){
if(context->bridge->round_robin == false && context->bridge->cur_address != 0){
context->bridge->primary_retry = db.now_s + 5;
}
Expand Down

0 comments on commit 880df73

Please sign in to comment.