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

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

Issue 694413004: Flush analysis server output stream when closed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | no next file » | 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 cc0274d3b2922465f7694566bda51dba38a7cbf7..730f4ec55cc76d773ceb95512b4d4458216ec52f 100644
--- a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
+++ b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
@@ -80,9 +80,11 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
@override
void close() {
- if (!_closed.isCompleted) {
- _closed.complete();
- }
+ output.flush().then((_) {
+ if (!_closed.isCompleted) {
+ _closed.complete();
+ }
+ });
}
@override
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698