Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bridge disconnect notification not working #2499

Closed
jsaak opened this issue Mar 30, 2022 · 1 comment
Closed

bridge disconnect notification not working #2499

jsaak opened this issue Mar 30, 2022 · 1 comment

Comments

@jsaak
Copy link

jsaak commented Mar 30, 2022

I have a bridge in mosquitto.conf:

connection robin
  notification_topic MOSQUITTO/state
  keepalive_interval 30
  restart_timeout 10

If i stop the internet connection:

nmcli con down gsm

I expect to have a message on the notification topic with "0" payload, but i do not get any.
In mosquitto.log i see that it tries to reconnect:

1648661550: Connecting bridge (step 1) robin ()
1648661550: Connecting bridge (step 2) robin ()
1648661550: Error creating bridge: Network is unreachable.

When i restore the connection I get the notification with "1" as the payload

I am guessing that these lines are not ok:
bridge.c:212 and 219

if(!context->bridge->initial_notification_done){

ps: using mosquitto version 2.0.11

@jsaak
Copy link
Author

jsaak commented Mar 30, 2022

duplicate of #2467

@jsaak jsaak closed this as completed Mar 30, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant