Initialize duration member variable in NimBLEAdvertising constructor.

m_duration member variable was not set previously which could trigger advertising to start if the
host was reset prior to the application calling start.
This commit is contained in:
h2zero 2021-01-13 18:21:23 -07:00
parent b064cc65d4
commit 5629f4d3e9

View file

@ -63,6 +63,8 @@ NimBLEAdvertising::NimBLEAdvertising() : m_slaveItvl() {
m_customScanResponseData = false;
m_scanResp = true;
m_advDataSet = false;
// Set this to non-zero to prevent auto start if host reset before started by app.
m_duration = BLE_HS_FOREVER;
} // NimBLEAdvertising