From adf10ece87e799c1ed8ba82165d72c5cfe9f569b Mon Sep 17 00:00:00 2001 From: Karl Burtram Date: Wed, 31 Oct 2018 09:48:57 -0700 Subject: [PATCH] Wait for queued tasks to complete before processing subsequent tasks (#724) --- .../LanguageServices/BindingQueue.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/BindingQueue.cs b/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/BindingQueue.cs index 7cb0d592..9af57517 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/BindingQueue.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/BindingQueue.cs @@ -377,8 +377,8 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices bindTask.ContinueWithOnFaulted(t => Logger.Write(TraceEventType.Error, "Binding queue threw exception " + t.Exception.ToString())); - // Give the task a chance to cancel before moving on to the next operation - Task.WaitAny(bindTask, Task.Delay(bindingContext.BindingTimeout)); + // Give the task a chance to complete before moving on to the next operation + bindTask.Wait(); } } catch (Exception ex)