From a4403fe6b8236d57d166ac39eca07595170cca05 Mon Sep 17 00:00:00 2001 From: h2zero Date: Wed, 29 Dec 2021 07:50:42 -0700 Subject: [PATCH] Clear client disconnect timer in constructor before initializing. --- src/NimBLEClient.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/NimBLEClient.cpp b/src/NimBLEClient.cpp index 7f923a1..2844569 100644 --- a/src/NimBLEClient.cpp +++ b/src/NimBLEClient.cpp @@ -73,6 +73,7 @@ NimBLEClient::NimBLEClient(const NimBLEAddress &peerAddress) : m_peerAddress(pee m_pConnParams.min_ce_len = BLE_GAP_INITIAL_CONN_MIN_CE_LEN; // Minimum length of connection event in 0.625ms units m_pConnParams.max_ce_len = BLE_GAP_INITIAL_CONN_MAX_CE_LEN; // Maximum length of connection event in 0.625ms units + memset(&m_dcTimer, 0, sizeof(m_dcTimer)); ble_npl_callout_init(&m_dcTimer, nimble_port_get_dflt_eventq(), NimBLEClient::dcTimerCb, this); } // NimBLEClient