Skip to content

How to turn off RECONNECT? #675

@liuhuan0225

Description

@liuhuan0225

🐛 Bug Report

Cannot call disconnect in non-CONNECTED state
Unable to stop automaticReconnect in Android Device
hivemq-shaded = { group = "com.hivemq", name = "hivemq-mqtt-client-shaded", version = "1.3.5" }

🔬 How To Reproduce

Steps to reproduce the behavior:

  1. useMqttVersion3().automaticReconnect().initialDelay(1, TimeUnit.SECONDS).maxDelay(2, TimeUnit.SECONDS).applyAutomaticReconnect()
  2. Turn off device network and run HiveMQ
  3. disconnect() 提示 com.hivemq.client.mqtt.exceptions.MqttClientStateException: MQTT client is not connected.
  4. AutomaticReconnect will still be executed and cannot be stopped

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions