fix: correctly flush logs when there was a db migration error

This commit is contained in:
Tomasz Sowa 2024-04-15 06:38:23 +02:00
parent eacdcfb980
commit 8b0b25ed0a
Signed by: tomasz.sowa
GPG Key ID: 662CC1438638588B
1 changed files with 1 additions and 9 deletions

View File

@ -508,15 +508,6 @@ void UninitializeWinix(Log & log, bool was_winix_running)
{
Winix::RemovePidFile();
Winix::CleanupCurlLibrary();
if( was_winix_running )
{
log << Winix::logsave;
}
else
{
FlushLogToStdout(log);
}
}
@ -564,6 +555,7 @@ int main(int argc, const char ** argv, const char ** env)
Winix::LogInfo(log, Winix::log1, "Winix", true, "stopped");
UninitializeWinix(log, run_status.should_continue);
log << Winix::logsave;
return run_status.exit_code;
}