Commit 2504c7af authored by Savorboard's avatar Savorboard

Fix the connection release bug when occurred an exception.

parent dde9088b
......@@ -171,6 +171,7 @@ SELECT * FROM `{_prefix}.received` WHERE Id=LAST_INSERT_ID();";
catch (MySqlException)
{
transaction.Dispose();
connection.Dispose();
throw;
}
......
......@@ -146,6 +146,7 @@ namespace DotNetCore.CAP.PostgreSql
catch (NpgsqlException)
{
transaction.Dispose();
connection.Dispose();
throw;
}
......
......@@ -153,6 +153,7 @@ VALUES(@Name,@Group,@Content,@Retries,@Added,@ExpiresAt,@StatusName);";
catch (SqlException)
{
transaction.Dispose();
connection.Dispose();
throw;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment