From 76dd1bc8c4478ae1f8efa4d7d2fbc44c26fd5afe Mon Sep 17 00:00:00 2001 From: Michael Kent Date: Tue, 17 Sep 2024 12:31:00 -0500 Subject: [PATCH] Fix: Regression from NHibernate 1.2 in flushing, copy to async methods --- src/NHibernate/Async/Impl/SessionImpl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NHibernate/Async/Impl/SessionImpl.cs b/src/NHibernate/Async/Impl/SessionImpl.cs index b219757f21f..e5c773e3d63 100644 --- a/src/NHibernate/Async/Impl/SessionImpl.cs +++ b/src/NHibernate/Async/Impl/SessionImpl.cs @@ -686,7 +686,7 @@ public override async Task AutoFlushIfRequiredAsync(ISet querySpac cancellationToken.ThrowIfCancellationRequested(); using (BeginProcess()) { - if (!ConnectionManager.IsInActiveTransaction) + if (IsClosed) { // do not auto-flush while outside a transaction return false;