eclipse/paho.mqtt.c

Call to async_client::disconnect()->wait() produces exception if client is already in disconnected state

Alexk12 opened this issue · 1 comments

Describe the bug
Call to async_client::disconnect()->wait() produces exception if client is already in disconnected state (for example, if connection is lost).

To Reproduce

  1. Create async_client. Connect and subscribe.
  2. Make conditions for client lost connection (callback receives lost connection call).
  3. Call client.disconnect()->wait()

Expected behavior
Client should not produce an exception and just return if it is already in disconnected state.

** Environment:**

  • OS: Windows
  • Version: paho.mqtt.c 1.3.12 + paho.mqtt.cpp 1.2.0

This is an issue of paho.mqtt.cpp.