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 fcb3c0d commit b75a4edCopy full SHA for b75a4ed
src/noble/lib/bluez/bindings.js
@@ -364,8 +364,21 @@ class BluezBindings extends EventEmitter {
364
}
365
);
366
debug(`resultChrs => ${JSON.stringify(resultChrs)}`);
367
- this.emit('characteristicsDiscover', deviceUuid, serviceUuid, resultChrs);
368
- debug(`[${deviceUuid}] OK. Found ${resultChrs.length} Characteristics.`);
+ try {
+ this.emit(
369
+ 'characteristicsDiscover',
370
+ deviceUuid,
371
+ serviceUuid,
372
+ resultChrs
373
+ );
374
+ debug(
375
+ `[${deviceUuid}] OK. Found ${resultChrs.length} Characteristics.`
376
377
+ } catch (err) {
378
379
+ `Failed to emit 'characteristicsDiscover' event. message:${err.message}`
380
381
+ }
382
}, timeout);
383
384
0 commit comments