Skip to content

Reconnect option #235

@emiltin

Description

@emiltin

#149 mentions the {reconnect: true} option. This reconnect option seems to be missing from the documentation in the Readme?

I'm trying to use it, but it doesn't seem to reconnect.

I pass {reconnect: true} as part of the options when calling start_link() and emqtt starts normally. I'm connecting to emqx running locally in a docker container. I can now publish and subscribe to messages.

If I stop the emqx broker, then emqtt does not immediately report any error, even after waiting for several minutes. But if try to publish data, i get [error] shutdown: :econnrefused, and my gen_server dies. This is similar to what happens if the broker is unavailable when I start emqtt.

I would expect emqtt to reconnect, instead of dying?

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