Skip to content

Commit

Permalink
Fix bridges not sending failure notification messages.
Browse files Browse the repository at this point in the history
This is for messages to the local broker if the remote bridge connection
fails.

Closes #1488.
Closes #2467.
  • Loading branch information
ralight committed May 25, 2022
1 parent 3e1cf8a commit ebfebf8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.txt
Expand Up @@ -13,6 +13,8 @@ Broker:
Closes #2404.
- Add clients to session expiry check list when restarting and reloading from
persistence. Closes #2546.
- Fix bridges not sending failure notification messages to the local broker if
the remote bridge connection fails. Closes #2467. Closes #1488.

Client library:
- Fix threads library detection on Windows under cmake. Bumps the minimum
Expand Down
6 changes: 6 additions & 0 deletions lib/util_mosq.c
Expand Up @@ -104,6 +104,12 @@ int mosquitto__check_keepalive(struct mosquitto *mosq)
pthread_mutex_unlock(&mosq->msgtime_mutex);
}else{
#ifdef WITH_BROKER
# ifdef WITH_BRIDGE
if(mosq->bridge){
context__send_will(mosq);
}
# endif
#endif
net__socket_close(mosq);
#else
net__socket_close(mosq);
Expand Down

0 comments on commit ebfebf8

Please sign in to comment.