Skip to content

Commit

Permalink
Merge pull request #15 from npehrsson/master
Browse files Browse the repository at this point in the history
replaces bad dispose
  • Loading branch information
robdmoore committed Mar 26, 2015
2 parents 904347e + eac328a commit b376d0b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions NHibernate.SqlAzure/ReliableSqlDbConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace NHibernate.SqlAzure
/// </summary>
public class ReliableSqlDbConnection : DbConnection
{
bool disposed = false;
/// <summary>
/// The underlying <see cref="ReliableSqlConnection"/>.
/// </summary>
Expand All @@ -36,13 +37,14 @@ public static explicit operator SqlConnection(ReliableSqlDbConnection connection
return connection.ReliableConnection.Current;
}

/// <summary>
/// Disposes the underling <see cref="ReliableSqlConnection"/> as well as the current class.
/// </summary>
public new void Dispose()
{
ReliableConnection.Dispose();
base.Dispose();
protected override void Dispose(bool disposing) {
if (disposed)
return;
if (disposing) {
ReliableConnection.Dispose();
}
disposed = true;
base.Dispose(disposing);
}

#region Wrapping code
Expand Down

0 comments on commit b376d0b

Please sign in to comment.