Skip to content

Reconnection to MQTT server fails #17

Description

@chotee

When the MQTT server is rebooted, the MQTT client does not reconnect to the server once that becomes available again. The consequence being that mqtt publishing services are still not working long after the server has come back.

https://godoc.org/github.com/yosssi/gmq/mqtt/client#ConnectOptions has setting PINGRESPTimeout . This can be set to time.Duration that it is allowed for the ping to make it back. If that fails
https://godoc.org/github.com/yosssi/gmq/mqtt/client#pkg-variables documents the errors ErrPINGRESPTimeout or ErrInvalidPINGRESP . as the errror to be raised if the server is no longer available.

I don't know if PINGRESPTimeout also triggers that PINGREQs are send by the client or what sets the frequency that that happens. I suspect you have the send your own PINGREQs ( https://godoc.org/github.com/yosssi/gmq/mqtt/packet#PINGREQ ) to trigger the timeout to happen.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions