diff --git a/lib/src/transport/message_channel/message_channel.dart b/lib/src/transport/message_channel/message_channel.dart index 1538f17..f6aea1d 100644 --- a/lib/src/transport/message_channel/message_channel.dart +++ b/lib/src/transport/message_channel/message_channel.dart @@ -44,11 +44,9 @@ class MessagePortStreamChannel final _in = StreamController(sync: true); final _out = StreamController(sync: true); - late final StreamSubscription _onReceiveMessageSubscription; late final StreamSubscription _onPostMessageSubscription; Future dispose() async { - await _onReceiveMessageSubscription.cancel(); await _onPostMessageSubscription.cancel(); await _in.close(); await _out.close();