Fix race condition rotating log files.

This commit is contained in:
JoelKatz
2013-07-16 21:43:36 -07:00
parent af1fb12962
commit 92f56aa2e1

View File

@@ -145,6 +145,8 @@ void Log::print (std::string const& text, bool toStdErr)
std::string Log::rotateLog ()
{
boost::recursive_mutex::scoped_lock sl (s_lock);
bool const wasOpened = s_logFile.closeAndReopen ();
if (wasOpened)