diff --git a/src/Orchard/Data/SessionLocator.cs b/src/Orchard/Data/SessionLocator.cs index 120d9c297..d64d7963c 100644 --- a/src/Orchard/Data/SessionLocator.cs +++ b/src/Orchard/Data/SessionLocator.cs @@ -87,14 +87,14 @@ namespace Orchard.Data { Logger.Debug("Reverting operations from transaction"); _transaction.Rollback(); } - - _transaction.Dispose(); - Logger.Debug("Transaction disposed"); } catch (Exception e) { Logger.Error(e, "Error while disposing the transaction."); } finally { + _transaction.Dispose(); + Logger.Debug("Transaction disposed"); + _transaction = null; _cancelled = false; }