Initialize peerAddress in client constructor.

Co-authored-by: wakwak-koba <wakwak-koba@users.noreply.github.com>
This commit is contained in:
h2zero
2020-07-30 12:31:17 -06:00
committed by h2zero
parent 73cec7a92a
commit 97832d4d95
3 changed files with 4 additions and 8 deletions

View File

@@ -53,8 +53,7 @@ static NimBLEClientCallbacks defaultCallbacks;
* @brief Constructor, private - only callable by NimBLEDevice::createClient
* to ensure proper handling of the list of client objects.
*/
NimBLEClient::NimBLEClient()
{
NimBLEClient::NimBLEClient(const NimBLEAddress &peerAddress) : m_peerAddress(peerAddress) {
m_pClientCallbacks = &defaultCallbacks;
m_conn_id = BLE_HS_CONN_HANDLE_NONE;
m_isConnected = false;