Skip to content

Commit 594df7a

Browse files
committed
Clear client disconnect timer in constructor before initializing.
1 parent bc6b62a commit 594df7a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/NimBLEClient.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ NimBLEClient::NimBLEClient(const NimBLEAddress &peerAddress) : m_peerAddress(pee
7474
m_pConnParams.min_ce_len = BLE_GAP_INITIAL_CONN_MIN_CE_LEN; // Minimum length of connection event in 0.625ms units
7575
m_pConnParams.max_ce_len = BLE_GAP_INITIAL_CONN_MAX_CE_LEN; // Maximum length of connection event in 0.625ms units
7676

77+
memset(&m_dcTimer, 0, sizeof(m_dcTimer));
7778
ble_npl_callout_init(&m_dcTimer, nimble_port_get_dflt_eventq(),
7879
NimBLEClient::dcTimerCb, this);
7980
} // NimBLEClient

0 commit comments

Comments
 (0)