Skip to content

Commit

Permalink
Merge branch 'fix-backoff' of git:https://github.com/abiliojr/mosquitto int…
Browse files Browse the repository at this point in the history
…o abiliojr-fix-backoff
  • Loading branch information
ralight committed Mar 11, 2021
2 parents c11a2d5 + 2a38b71 commit 4b0a4c5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,8 @@ int bridge__connect_step3(struct mosquitto *context)

rc = send__connect(context, context->keepalive, context->clean_start, NULL);
if(rc == MOSQ_ERR_SUCCESS){
bridge__backoff_reset(context);
return MOSQ_ERR_SUCCESS;
}else if(rc == MOSQ_ERR_ERRNO && errno == ENOTCONN){
bridge__backoff_reset(context);
return MOSQ_ERR_SUCCESS;
}else{
if(rc == MOSQ_ERR_TLS){
Expand Down Expand Up @@ -455,10 +453,8 @@ int bridge__connect(struct mosquitto *context)

rc2 = send__connect(context, context->keepalive, context->clean_start, NULL);
if(rc2 == MOSQ_ERR_SUCCESS){
bridge__backoff_reset(context);
return rc;
}else if(rc2 == MOSQ_ERR_ERRNO && errno == ENOTCONN){
bridge__backoff_reset(context);
return MOSQ_ERR_SUCCESS;
}else{
if(rc2 == MOSQ_ERR_TLS){
Expand Down Expand Up @@ -563,6 +559,8 @@ int bridge__on_connect(struct mosquitto *context)
}
}

bridge__backoff_reset(context);

return MOSQ_ERR_SUCCESS;
}

Expand Down

0 comments on commit 4b0a4c5

Please sign in to comment.