From 532f7b0912ede320224c6a91b56c1f685c2c0624 Mon Sep 17 00:00:00 2001 From: Alex Ma Date: Tue, 20 Jun 2023 20:21:07 -0700 Subject: [PATCH] removed change to connection service with fix (#2111) --- .../Connection/ConnectionService.cs | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionService.cs b/src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionService.cs index a999d070..bf750e5e 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionService.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionService.cs @@ -1049,35 +1049,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection { try { - bool disconnect = false; - if (connection.ConnectionString != null) - { - int totalCount = 0; - foreach (KeyValuePair entry in OwnerToConnectionMap) - { - foreach (DbConnection value in entry.Value.AllConnections) - { - if (value.ConnectionString == connection.ConnectionString) - { - totalCount++; - } - } - } - - if (totalCount == 1) - { - disconnect = true; - } - } - else - { - disconnect = true; - } - - if (disconnect) - { - connection.Close(); - } + connection.Close(); } catch (Exception) {