Index: pkg/analysis_server/lib/src/channel/web_socket_channel.dart |
diff --git a/pkg/analysis_server/lib/src/channel/web_socket_channel.dart b/pkg/analysis_server/lib/src/channel/web_socket_channel.dart |
index 0368eb64a6e5726a41a4d359dabafc750289eccf..282b1f965fecb814f7e2b012abaaa169a091fdef 100644 |
--- a/pkg/analysis_server/lib/src/channel/web_socket_channel.dart |
+++ b/pkg/analysis_server/lib/src/channel/web_socket_channel.dart |
@@ -55,10 +55,11 @@ class WebSocketClientChannel implements ClientCommunicationChannel { |
} |
@override |
- Future<Response> sendRequest(Request request) { |
+ Future<Response> sendRequest(Request request) async { |
String id = request.id; |
socket.add(JSON.encode(request.toJson())); |
- return responseStream.firstWhere((Response response) => response.id == id); |
+ return await responseStream |
+ .firstWhere((Response response) => response.id == id); |
} |
} |