Skip to content

Commit

Permalink
Update ns_input_stream.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan committed Sep 27, 2024
1 parent a0b5769 commit c7c5c35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/objective_c/lib/src/ns_input_stream.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ extension NSInputStreamStreamExtension on Stream<List<int>> {

print('Here1');
dataSubscription = listen((data) {
print('data: $data');
if (inputStream.addData_(data.toNSData()) > maxReadAheadSize) {
print('pause');
dataSubscription.pause();
Expand All @@ -47,6 +48,7 @@ extension NSInputStreamStreamExtension on Stream<List<int>> {
dataSubscription.cancel();
port.close();
} else {
print('Resuming');
dataSubscription.resume();
}
}, onDone: dataSubscription.cancel);
Expand Down

0 comments on commit c7c5c35

Please sign in to comment.