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

This commit is contained in:
Dan Rubel
2017-03-13 15:07:13 -04:00
committed by GitHub
parent 31dc3c4722
commit b10e60bc15

View File

@@ -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 {