| 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 c16ed6ba98cebcac5e3e576f2d7887ab8a1c1674..ae25102cf65041bec9e0659f06432b36f56b39fd 100644
|
| --- a/pkg/analysis_server/lib/src/analysis_server.dart
|
| +++ b/pkg/analysis_server/lib/src/analysis_server.dart
|
| @@ -907,7 +907,7 @@ class AnalysisServer {
|
| * Return `true` if analysis is complete.
|
| */
|
| bool isAnalysisComplete() {
|
| - return operationQueue.isEmpty;
|
| + return operationQueue.isEmpty && !analysisDriverScheduler.isAnalyzing;
|
| }
|
|
|
| /**
|
| @@ -1152,10 +1152,14 @@ class AnalysisServer {
|
| }
|
|
|
| /**
|
| - * Send status notification to the client. The `operation` is the operation
|
| - * being performed or `null` if analysis is complete.
|
| + * Send status notification to the client. The state of analysis is given by
|
| + * the [status] information.
|
| */
|
| void sendStatusNotificationNew(nd.AnalysisStatus status) {
|
| + if (_onAnalysisCompleteCompleter != null && !status.isAnalyzing) {
|
| + _onAnalysisCompleteCompleter.complete();
|
| + _onAnalysisCompleteCompleter = null;
|
| + }
|
| // Only send status when subscribed.
|
| if (!serverServices.contains(ServerService.STATUS)) {
|
| return;
|
|
|