Initialize peerAddress in client constructor.

Co-authored-by: wakwak-koba <wakwak-koba@users.noreply.github.com>
This commit is contained in:
h2zeroandwakwak-koba authored and h2zero committed 2020-08-03 22:13:57 -06:00
1 parent 73cec7a92a
commit 97832d4d95
3 files changed
+4 -8

No files matched your search

+1 -4
View File
@@ -148,10 +148,7 @@ void NimBLEDevice::stopAdvertising() {
NIMBLE_MAX_CONNECTIONS);
}
NimBLEClient* pClient = new NimBLEClient();
if(peerAddress != NimBLEAddress("")) {
pClient->setPeerAddress(peerAddress);
}
NimBLEClient* pClient = new NimBLEClient(peerAddress);
m_cList.push_back(pClient);
return pClient;