Permalink
Browse files

Additional check if child session has already been closed during pare…

…nt session closing.
  • Loading branch information...
1 parent 9efd3c3 commit 2225bd9eef8ee92ce5c344a778f9315d6607abe2 Wojciech Stelmaszewski committed Dec 7, 2016
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/NHibernate/Impl/SessionImpl.cs
@@ -370,7 +370,10 @@ public IDbConnection Close()
{
foreach (KeyValuePair<EntityMode, ISession> pair in childSessionsByEntityMode)
{
- pair.Value.Close();
+ if (pair.Value.IsOpen)
+ {
+ pair.Value.Close();
+ }
}
}
}

0 comments on commit 2225bd9

Please sign in to comment.