610262374@qq.com 6 years ago
parent
commit
1b2ea363a9
  1. 9
      Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs

9
Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs

@ -110,11 +110,14 @@ namespace SqlSugar
if (this.IsMasterSlaveSeparation)
{
foreach (var slaveConnection in this.SlaveConnections)
if (this.SlaveConnections != null)
{
if (slaveConnection != null && slaveConnection.State == ConnectionState.Open)
foreach (var slaveConnection in this.SlaveConnections)
{
slaveConnection.Dispose();
if (slaveConnection != null && slaveConnection.State == ConnectionState.Open)
{
slaveConnection.Dispose();
}
}
}
}

Loading…
Cancel
Save