-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
[flutter_tools] flutter daemon handles a closed stdout IOSink #105075
[flutter_tools] flutter daemon handles a closed stdout IOSink #105075
Conversation
@@ -219,6 +219,10 @@ class DaemonStreams { | |||
if (binary != null) { | |||
_outputSink.add(binary); | |||
} | |||
} on StateError catch (error) { | |||
_logger.printError('Failed to write daemon command response: $error'); |
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.
@zanderso Actually, if we're running in the daemon context and STDOUT is closed, should we just tool exit since the IDE plugin isn't listening anyway?
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.
It may happen already as a consequence of closing _outputSink
. But otherwise, probably yeah.
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.
Yeah, I think you're right, in playing around with this, I can't get it to leak the tool process, so I think we're good
@@ -219,6 +219,10 @@ class DaemonStreams { | |||
if (binary != null) { | |||
_outputSink.add(binary); | |||
} | |||
} on StateError catch (error) { | |||
_logger.printError('Failed to write daemon command response: $error'); |
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.
It may happen already as a consequence of closing _outputSink
. But otherwise, probably yeah.
Fixes #99367
In the stacktrace from crash logging, the
IOSink
is coming from STDOUT.