Explorar el Código

Fix the connection release bug when occurred an exception.

undefined
Savorboard hace 7 años
padre
commit
2504c7af8f
Se han modificado 3 ficheros con 3 adiciones y 0 borrados
  1. +1
    -0
      src/DotNetCore.CAP.MySql/MySqlStorageConnection.cs
  2. +1
    -0
      src/DotNetCore.CAP.PostgreSql/PostgreSqlStorageConnection.cs
  3. +1
    -0
      src/DotNetCore.CAP.SqlServer/SqlServerStorageConnection.cs

+ 1
- 0
src/DotNetCore.CAP.MySql/MySqlStorageConnection.cs Ver fichero

@@ -171,6 +171,7 @@ SELECT * FROM `{_prefix}.received` WHERE Id=LAST_INSERT_ID();";
catch (MySqlException)
{
transaction.Dispose();
connection.Dispose();
throw;
}



+ 1
- 0
src/DotNetCore.CAP.PostgreSql/PostgreSqlStorageConnection.cs Ver fichero

@@ -146,6 +146,7 @@ namespace DotNetCore.CAP.PostgreSql
catch (NpgsqlException)
{
transaction.Dispose();
connection.Dispose();
throw;
}



+ 1
- 0
src/DotNetCore.CAP.SqlServer/SqlServerStorageConnection.cs Ver fichero

@@ -153,6 +153,7 @@ VALUES(@Name,@Group,@Content,@Retries,@Added,@ExpiresAt,@StatusName);";
catch (SqlException)
{
transaction.Dispose();
connection.Dispose();
throw;
}



Cargando…
Cancelar
Guardar