Skip to content

Commit

Permalink
fix: 🐛 Message channel dispose uninitialized late field.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chralu committed Oct 15, 2024
1 parent 686756d commit b003ab7
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/src/transport/message_channel/message_channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ class MessagePortStreamChannel
final _in = StreamController<String>(sync: true);
final _out = StreamController<String>(sync: true);

late final StreamSubscription<MessageEvent> _onReceiveMessageSubscription;
late final StreamSubscription<String> _onPostMessageSubscription;

Future<void> dispose() async {
await _onReceiveMessageSubscription.cancel();
await _onPostMessageSubscription.cancel();
await _in.close();
await _out.close();
Expand Down

0 comments on commit b003ab7

Please sign in to comment.