Permalink
Browse files

Merge pull request #542 from itmagination/simple_check_if_child_sessi…

…on_has_already_been_closed

Additional check if child session has already been closed during parent session closing.
2 parents 8671389 + 2225bd9 commit 36100cc0a31f85e2364171839904575fb649473f @gliljas gliljas committed on GitHub Jan 4, 2017
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 36100cc

Please sign in to comment.