From 22d5afa613ca1a045b78aec4c8fbefa46bd14062 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Mon, 4 Nov 2024 17:03:07 +0700 Subject: [PATCH] close fwdata project once sync is done --- backend/FwHeadless/Program.cs | 1 + backend/FwLite/FwDataMiniLcmBridge/FwDataFactory.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/FwHeadless/Program.cs b/backend/FwHeadless/Program.cs index c34848d5b..0df8c4982 100644 --- a/backend/FwHeadless/Program.cs +++ b/backend/FwHeadless/Program.cs @@ -100,6 +100,7 @@ await crdtSyncService.Sync(); var srResult2 = srService.SendReceive(fwDataProject, projectCode); logger.LogInformation("Send/Receive result after CRDT sync: {srResult2}", srResult2.Output); + fwDataFactory.CloseProject(fwDataProject); return TypedResults.Ok(result); } diff --git a/backend/FwLite/FwDataMiniLcmBridge/FwDataFactory.cs b/backend/FwLite/FwDataMiniLcmBridge/FwDataFactory.cs index 3490145a8..fb085fefe 100644 --- a/backend/FwLite/FwDataMiniLcmBridge/FwDataFactory.cs +++ b/backend/FwLite/FwDataMiniLcmBridge/FwDataFactory.cs @@ -120,7 +120,7 @@ public void CloseCurrentProject() CloseProject(fwDataProject); } - private void CloseProject(FwDataProject project) + public void CloseProject(FwDataProject project) { // if we are shutting down, don't do anything because we want project dispose to be called as part of the shutdown process. if (_shuttingDown) return;