Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete existing connection before connecting
If the current connection is terminated unexpectedly (e.g. because the WiFi connection is dropped) the disconnect callback is not called. This means that reestablishing the existing connection is not possible any more. Avoid this issue by forcefully removing the existing connection before initiating the reconnection. Calling MQTT_Disconnect and waiting for the disconnection callback should still be performed for intentional disconnections. Fixes #96
- Loading branch information