mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
removed change to connection service with fix (#2111)
This commit is contained in:
@@ -1049,35 +1049,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
bool disconnect = false;
|
connection.Close();
|
||||||
if (connection.ConnectionString != null)
|
|
||||||
{
|
|
||||||
int totalCount = 0;
|
|
||||||
foreach (KeyValuePair<string, ConnectionInfo> 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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user