Merge pull request #268 from ogatatsu/patch-2

Fix auto-start of advertising when central is connected
This commit is contained in:
hathach authored and GitHub committed 2019-06-10 15:10:15 +07:00
commit e690442c7f
1 file changed
+1 -1
@@ -418,7 +418,7 @@ void BLEAdvertising::_eventHandler(ble_evt_t* evt)
break;
case BLE_GAP_EVT_DISCONNECTED:
if ( bitRead(_conn_mask, conn_hdl) && (0 == Bluefruit.connected()) )
if ( bitRead(_conn_mask, conn_hdl) && (0 == Bluefruit.Periph.connected()) )
{
bitClear(_conn_mask, conn_hdl);