Skip to content

Commit

Permalink
use a broadcast stream controller
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisMoschina committed Jan 20, 2025
1 parent a3d2c29 commit 7d2b1b5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/models/devices/open_earable_factory.dart
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class _OpenEarableSensor extends Sensor {
}

Stream<SensorValue> _createSingleDataSubscription(String componentName) {
StreamController<SensorValue> streamController = StreamController();
StreamController<SensorValue> streamController = StreamController.broadcast();

_dataSubscription?.cancel();
_dataSubscription = _sensorManager.subscribeToSensorData(_sensorId).listen((data) {
Expand Down
1 change: 0 additions & 1 deletion lib/src/models/devices/open_earable_v2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -332,4 +332,3 @@ class OpenEarableV2 extends Wearable
}
}
}

0 comments on commit 7d2b1b5

Please sign in to comment.