We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 462f918 commit 0d7592aCopy full SHA for 0d7592a
src/NimBLEService.cpp
@@ -91,6 +91,13 @@ void NimBLEService::dump() const {
91
*/
92
bool NimBLEService::start() {
93
NIMBLE_LOGD(LOG_TAG, ">> start(): Starting service: %s", toString().c_str());
94
+
95
+ // If started previously and no characteristics have been added or removed,
96
+ // then we can skip the service registration process.
97
+ if (m_pSvcDef->characteristics && !getServer()->m_svcChanged) {
98
+ return true;
99
+ }
100
101
// If started previously, clear everything and start over
102
if (m_pSvcDef->characteristics) {
103
if (m_pSvcDef->characteristics->descriptors) {
0 commit comments