Update main.d

* Ensure that syncEngineInstance is shutdown the correct way, checking that it has been initialised before attempting a shutdown
This commit is contained in:
abraunegg 2024-05-12 08:52:48 +10:00
parent 797dfd1f14
commit 837933d196

View file

@ -1366,7 +1366,7 @@ extern(C) nothrow @nogc @system void exitHandler(int value) {
addLogEntry("\nReceived termination signal, initiating cleanup");
// Wait for all parallel jobs that depend on the database to complete
addLogEntry("Waiting for any existing upload|download process to complete");
syncEngineInstance.shutdown();
shutdownSyncEngine();
// Perform the shutdown process
performSynchronisedExitProcess("exitHandler");