From 5a4203126c4ac42ea295ef7f188837d46d296c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarl=20Sveinung=20Fl=C3=B8=20Rasmussen?= Date: Wed, 13 Oct 2021 14:31:49 +0200 Subject: [PATCH] Cancel DBCommand after finish reading events by PersistenceId --- .../Akka.Persistence.Sql.Common/Journal/QueryExecutor.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/contrib/persistence/Akka.Persistence.Sql.Common/Journal/QueryExecutor.cs b/src/contrib/persistence/Akka.Persistence.Sql.Common/Journal/QueryExecutor.cs index 2285f2e3267..13d8a3327b2 100644 --- a/src/contrib/persistence/Akka.Persistence.Sql.Common/Journal/QueryExecutor.cs +++ b/src/contrib/persistence/Akka.Persistence.Sql.Common/Journal/QueryExecutor.cs @@ -543,6 +543,7 @@ public virtual async Task SelectByPersistenceIdAsync(DbConnection connection, Ca var persistent = ReadEvent(reader); callback(persistent); } + command.Cancel(); } } }