Skip to content

Commit

Permalink
Prevent session connection closing in WorkflowTypeController (Orchard…
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Lipin authored and urbanit committed Mar 18, 2024
1 parent b86fd8f commit 814b46c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ public async Task<IActionResult> Index(WorkflowTypeIndexOptions options, PagerPa
.Take(pager.PageSize)
.ListAsync();

using var connection = await _session.CreateConnectionAsync();
// The existing session's connection is returned, don't dispose it
var connection = await _session.CreateConnectionAsync();

var dialect = _session.Store.Configuration.SqlDialect;
var sqlBuilder = dialect.CreateBuilder(_session.Store.Configuration.TablePrefix);
Expand Down

0 comments on commit 814b46c

Please sign in to comment.