diff --git a/src/VisualStudio/Core/Def/Implementation/Remote/ServiceHubRemoteHostClient.cs b/src/VisualStudio/Core/Def/Implementation/Remote/ServiceHubRemoteHostClient.cs index 259e191fcd060c73920eb5c6f07892cf20dcfeb9..d0c6f2c9ed07a2d1e28e715e31ef5ba78d7ed2dd 100644 --- a/src/VisualStudio/Core/Def/Implementation/Remote/ServiceHubRemoteHostClient.cs +++ b/src/VisualStudio/Core/Def/Implementation/Remote/ServiceHubRemoteHostClient.cs @@ -216,21 +216,6 @@ private void UnregisterGlobalOperationNotifications() globalOperationService.Started -= OnGlobalOperationStarted; globalOperationService.Stopped -= OnGlobalOperationStopped; } - - Task localTask; - lock (_globalNotificationsGate) - { - // Unilaterally transition us to the finished state. Once we're finished - // we cannot start or stop anymore. - _globalNotificationsTask = _globalNotificationsTask.ContinueWith( - _ => GlobalNotificationState.Finished, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default); - localTask = _globalNotificationsTask; - } - - // Have to wait for all the notifications to make it to the OOP side so we keep - // it in a consistent state. Also, if we don't do this, our _rpc object will - // get disposed while we're remoting over the messages to the oop side. - localTask.Wait(); } private void OnGlobalOperationStarted(object sender, EventArgs e)