Fix auto-start of advertising when central is connected

This commit is contained in:
ogatatsu authored and GitHub committed 2019-05-11 20:56:21 +09:00
1 parent cfd3f76866
commit 46395582fe
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);