diff --git a/Neo4jClient.FSharp.Tests/Neo4jClient.FSharp.Tests.fsproj b/Neo4jClient.FSharp.Tests/Neo4jClient.FSharp.Tests.fsproj
index db8826b4..eb916dd3 100644
--- a/Neo4jClient.FSharp.Tests/Neo4jClient.FSharp.Tests.fsproj
+++ b/Neo4jClient.FSharp.Tests/Neo4jClient.FSharp.Tests.fsproj
@@ -9,11 +9,11 @@
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -24,7 +24,7 @@
-
+
diff --git a/Neo4jClient.Tests/Neo4jClient.Tests.csproj b/Neo4jClient.Tests/Neo4jClient.Tests.csproj
index 74c21a6f..bbf46a2e 100644
--- a/Neo4jClient.Tests/Neo4jClient.Tests.csproj
+++ b/Neo4jClient.Tests/Neo4jClient.Tests.csproj
@@ -10,12 +10,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Neo4jClient.Vb.Tests/Neo4jClient.Vb.Tests.vbproj b/Neo4jClient.Vb.Tests/Neo4jClient.Vb.Tests.vbproj
index 88d9f668..be5d1bef 100644
--- a/Neo4jClient.Vb.Tests/Neo4jClient.Vb.Tests.vbproj
+++ b/Neo4jClient.Vb.Tests/Neo4jClient.Vb.Tests.vbproj
@@ -8,15 +8,15 @@
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Neo4jClient/BoltGraphClient.cs b/Neo4jClient/BoltGraphClient.cs
index 7ea32a66..863bd38a 100644
--- a/Neo4jClient/BoltGraphClient.cs
+++ b/Neo4jClient/BoltGraphClient.cs
@@ -367,7 +367,6 @@ async Task GetQueryStats(IResultCursor resultCursor)
else
{
var session = Driver.AsyncSession(ServerVersion, query.Database, query.IsWrite, query.Bookmarks);
-
async Task> Records(IAsyncQueryRunner work)
{
var cursor = await work.RunAsync(query, this).ConfigureAwait(false);
@@ -404,7 +403,7 @@ async Task> Records(IAsyncQueryRunner work)
context.Complete(query, lastBookmark, lastBookmarks, results.Count, stats);
return results;
}
-
+
private List ParseResults(IEnumerable result, CypherQuery query)
{
var deserializer = new CypherJsonDeserializer(this, query.ResultMode, query.ResultFormat, false, true);
@@ -475,6 +474,8 @@ async Task IRawGraphClient.ExecuteCypherAsync(CypherQuery query)
executionContext.Complete(query, session.LastBookmark, session.LastBookmarks, new QueryStats(summary.Counters));
}
else executionContext.Complete(query, session.LastBookmark, session.LastBookmarks);
+
+ await session.CloseAsync().ConfigureAwait(false);
}
}
diff --git a/Neo4jClient/Neo4jClient.csproj b/Neo4jClient/Neo4jClient.csproj
index f785346c..3fa90600 100644
--- a/Neo4jClient/Neo4jClient.csproj
+++ b/Neo4jClient/Neo4jClient.csproj
@@ -22,7 +22,7 @@
-
+