Merge pull request #122 from hailtondecastro/master
The connection was not being effectively closed due to needing to disconnect first
This commit is contained in:
@@ -435,9 +435,13 @@ namespace Spring.Data.NHibernate.Support
|
||||
conversation.RootSessionPerConversation = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tmpSession.IsConnected)
|
||||
tmpSession.Disconnect();
|
||||
{
|
||||
if (tmpSession.IsConnected)
|
||||
{
|
||||
IDbConnection conn = tmpSession.Disconnect();
|
||||
if (conn != null && conn.State == ConnectionState.Open)
|
||||
conn.Close();
|
||||
}
|
||||
}
|
||||
RemoveSession(tmpSession);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user