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 ce6235d01bfb3f5716b4266c96ebd0b88834002e..c17b77b748fbee5abe39aae81751d8feb7ec33e3 100644 |
--- a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart |
+++ b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart |
@@ -51,10 +51,11 @@ class ByteStreamClientChannel implements ClientCommunicationChannel { |
} |
@override |
- Future<Response> sendRequest(Request request) { |
+ Future<Response> sendRequest(Request request) async { |
String id = request.id; |
output.write(JSON.encode(request.toJson()) + '\n'); |
- return responseStream.firstWhere((Response response) => response.id == id); |
+ return await responseStream |
+ .firstWhere((Response response) => response.id == id); |
} |
} |