Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: pkg/analysis_server/lib/src/channel/byte_stream_channel.dart

Issue 2928703007: Catch exceptions in ByteStreamServerChannel._outputLine() and close the channel. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/test/channel/byte_stream_channel_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
diff --git a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
index b7747cc2ae6b7a2199c739c2e1363994d91df0cb..dce7e5912e154457ae9aa2e9ffb0cae973fb3399 100644
--- a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
+++ b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
@@ -144,7 +144,11 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
* Send the string [s] to [_output] followed by a newline.
*/
void _outputLine(String s) {
- _output.writeln(s);
+ runZoned(() {
+ _output.writeln(s);
+ }, onError: (e) {
+ close();
+ });
}
/**
« no previous file with comments | « no previous file | pkg/analysis_server/test/channel/byte_stream_channel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698