mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 17:23:27 -05:00
Proposed fix for : 3653 : Cancel not working even after disconnecting (#797)
* Proposed changes to stop query execution if an exception has occured before/during batch execution * Sending the error message was causing a test to fail - so removing for now. We can update the test to expect this is needed.
This commit is contained in:
@@ -638,7 +638,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
||||
// if any oldQuery exists on the executeParams.OwnerUri but it has not yet executed,
|
||||
// then shouldn't we cancel and clean out that query since we are about to create a new query object on the current OwnerUri.
|
||||
//
|
||||
if (ActiveQueries.TryGetValue(executeParams.OwnerUri, out oldQuery) && (oldQuery.HasExecuted || oldQuery.HasCancelled))
|
||||
if (ActiveQueries.TryGetValue(executeParams.OwnerUri, out oldQuery) && (oldQuery.HasExecuted || oldQuery.HasCancelled || oldQuery.HasErrored))
|
||||
{
|
||||
oldQuery.Dispose();
|
||||
ActiveQueries.TryRemove(executeParams.OwnerUri, out oldQuery);
|
||||
|
||||
Reference in New Issue
Block a user