-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[flutter_tools] check if stream is open before sending message in ios device #99947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1f123b9 to
1430f35
Compare
| onError: _linesController.addError, | ||
| onDone: _linesController.close, | ||
| (String line) { | ||
| if (!linesController.isClosed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the actual fix, the other added if checks are just defensive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why here and not in e.g. _newSyslogLineHandler(), or up on line 697?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were there multiple stacktraces we're seeing in CI, or is this a more general question? The stacktraces I saw where all on line 719.
Should I wrap the StreamController so that every .add() call has a check first if the delegate is closed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or I can add a new method on the IOSDeviceLogReader class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Jasguerrero
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #99021
Related to #99406
Related to #98421
Related to #99855