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

Unified Diff: pkg/analysis_server/lib/src/domain_server.dart

Issue 2963323002: Add analytics to analyzer-cli and analysis server. (Closed)
Patch Set: update from review comments Created 3 years, 5 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 | « pkg/analysis_server/lib/src/domain_analysis.dart ('k') | pkg/analysis_server/lib/src/edit/edit_domain.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/domain_server.dart
diff --git a/pkg/analysis_server/lib/src/domain_server.dart b/pkg/analysis_server/lib/src/domain_server.dart
index 95d12bdf5c68ae221f43abf1ee232bb043c1d05f..ccd12bc9dbcfa6e8c2ea3a0838dd343b982c072f 100644
--- a/pkg/analysis_server/lib/src/domain_server.dart
+++ b/pkg/analysis_server/lib/src/domain_server.dart
@@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+import 'dart:async';
+
import 'package:analysis_server/protocol/protocol.dart';
import 'package:analysis_server/protocol/protocol_constants.dart';
import 'package:analysis_server/protocol/protocol_generated.dart';
@@ -39,7 +41,8 @@ class ServerDomainHandler implements RequestHandler {
} else if (requestName == SERVER_REQUEST_SET_SUBSCRIPTIONS) {
return setSubscriptions(request);
} else if (requestName == SERVER_REQUEST_SHUTDOWN) {
- return shutdown(request);
+ shutdown(request);
+ return Response.DELAYED_RESPONSE;
}
} on RequestFailure catch (exception) {
return exception.response;
@@ -63,9 +66,9 @@ class ServerDomainHandler implements RequestHandler {
/**
* Cleanly shutdown the analysis server.
*/
- Response shutdown(Request request) {
- server.shutdown();
+ Future<Null> shutdown(Request request) async {
+ await server.shutdown();
Response response = new ServerShutdownResult().toResponse(request.id);
- return response;
+ server.sendResponse(response);
}
}
« no previous file with comments | « pkg/analysis_server/lib/src/domain_analysis.dart ('k') | pkg/analysis_server/lib/src/edit/edit_domain.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698