Commit b10e60bc authored by Dan Rubel's avatar Dan Rubel Committed by GitHub

do not forward errors if stream is closed (#8739)

parent 31dc3c47
......@@ -255,7 +255,8 @@ class AnalysisServer {
// {"event":"analysis.errors","params":{"file":"/Users/.../lib/main.dart","errors":[]}}
final String file = issueInfo['file'];
final List<AnalysisError> errors = issueInfo['errors'].map((Map<String, dynamic> json) => new AnalysisError(json)).toList();
_errorsController.add(new FileAnalysisErrors(file, errors));
if (!_errorsController.isClosed)
_errorsController.add(new FileAnalysisErrors(file, errors));
}
Future<bool> dispose() async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment