Commit 54e6b279 authored by J. Alexander Treuman's avatar J. Alexander Treuman

log: flush the warning log after redirecting stderr to the log files

Previously, the warning log was only flushed if creating the db or logging to stdout. This meant that under normal circumstances (no db creation, logging to files) the warning log was never flushed. This caused a bug when a warning was printed for each call to the status command where the warning buffer would grow endlessly, eventually using more and more CPU to reallocate it. git-svn-id: https://svn.musicpd.org/mpd/trunk@6660 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent 5a2f8549
......@@ -175,6 +175,7 @@ void setup_log_output(const int use_stdout)
if (!use_stdout) {
redirect_logs();
stdout_mode = 0;
flushWarningLog();
}
redirect_stdin();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment