Skip to content

Commit 4edbbed

Browse files
committed
Merge tag '5.0.3'
2 parents ef86fdf + 942b61b commit 4edbbed

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

build-common/NHibernate.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<VersionMajor Condition="'$(VersionMajor)' == ''">5</VersionMajor>
44
<VersionMinor Condition="'$(VersionMinor)' == ''">0</VersionMinor>
5-
<VersionPatch Condition="'$(VersionPatch)' == ''">2</VersionPatch>
5+
<VersionPatch Condition="'$(VersionPatch)' == ''">3</VersionPatch>
66
<VersionSuffix Condition="'$(VersionSuffix)' == ''"></VersionSuffix>
77

88
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix>

build-common/common.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030

3131
<!-- This is used only for build folder -->
3232
<!-- TODO: Either remove or refactor to use NHibernate.props -->
33-
<property name="project.version" value="5.0.2" overwrite="false" />
34-
<property name="project.version.numeric" value="5.0.2" overwrite="false" />
33+
<property name="project.version" value="5.0.3" overwrite="false" />
34+
<property name="project.version.numeric" value="5.0.3" overwrite="false" />
3535

3636
<!-- properties used to connect to database for testing -->
3737
<include buildfile="nhibernate-properties.xml" />

releasenotes.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
Build 5.0.2
1+
Build 5.0.3
2+
=============================
3+
4+
Release notes - NHibernate - Version 5.0.3
5+
6+
** Bug
7+
* #1462 Fix disposing SessionIdLoggingContext if CheckAndUpdateSessionStatus is failed
8+
9+
Build 5.0.2
210
=============================
311

412
Release notes - NHibernate - Version 5.0.2

src/NHibernate/Impl/AbstractSessionImpl.cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,17 +314,26 @@ public ProcessHelper(AbstractSessionImpl session)
314314
{
315315
_session = session;
316316
_context = new SessionIdLoggingContext(session.SessionId);
317-
session.CheckAndUpdateSessionStatus();
318-
_session._processing = true;
317+
try
318+
{
319+
_session.CheckAndUpdateSessionStatus();
320+
_session._processing = true;
321+
}
322+
catch
323+
{
324+
_context.Dispose();
325+
_context = null;
326+
throw;
327+
}
319328
}
320329

321330
public void Dispose()
322331
{
332+
_context.Dispose();
333+
_context = null;
323334
if (_session == null)
324335
throw new ObjectDisposedException("The session process helper has been disposed already");
325336
_session._processing = false;
326-
_context.Dispose();
327-
_context = null;
328337
_session = null;
329338
}
330339
}

0 commit comments

Comments
 (0)