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

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

Issue 453263002: Fix analysis server to only send SERVER_STATUS when subscribed to. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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
Index: pkg/analysis_server/lib/src/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index abdd1e0f9ae0aa3f7e0e1a97d43bcc8c8ccf9b4a..4264fec049b412116bb304f90ae513f35fa08bbd 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -431,6 +431,10 @@ class AnalysisServer {
* being performed or `null` if analysis is complete.
*/
void sendStatusNotification(ServerOperation operation) {
+ // Only send status when subscribed.
+ if (!serverServices.contains(ServerService.STATUS)) {
+ return;
+ }
// Only send status when it changes
bool isAnalyzing = operation != null;
if (statusAnalyzing == isAnalyzing) {

Powered by Google App Engine
This is Rietveld 408576698