Checklist
How often does this bug occurs?
always
Expected behavior
When I call esp_mqtt_client_reconnect while already connected I would expect it to trigger a disconnect and reconnect even if automatic reconnection is disabled.
This api is typically used to force reconnection upon a specific event.
Actual behavior (suspected bug)
https://github.com/espressif/esp-mqtt/blob/master/mqtt_client.c#L1893
It actually just returns a failure saying a reconnect is not currently in progress.
I do understand that behavior changes might not be a good idea, but the documentation should probably reflect it better.
I would say that the imperative reconnect would be wrong for the function it does.... this function causes the client to connect, because it can only be called after you have disconnected and already entered the reconnect state.