Fix BluetoothSerial thinking it's disconnected (#7372)
Currently, if a second connection occur in Bluetooth, this second connection is automatically disconnected (line 284).
This disconnection trigger the ESP_SPP_CLOSE_EVT, which clear the bit SPP_CONNECTED.
But the first connection remain active, and this flag shouldn't be cleared.
This fix the issue, by clearing the flag only if the last connection is closed
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Showing
Please register or sign in to comment