Merge pull request #866 from ZoneMinder/no_death_on_db_disconnect_in_logger

Don't die if db goes away during logging
This commit is contained in:
Andrew Bauer 2015-06-11 15:17:50 +02:00
commit 846bea2aa6
1 changed files with 1 additions and 2 deletions

View File

@ -604,8 +604,7 @@ void Logger::logPrint( bool hex, const char * const file, const int line, const
if ( mysql_query( &mDbConnection, sql ) )
{
databaseLevel( NOLOG );
Fatal( "Can't insert log entry: %s", mysql_error( &mDbConnection ) );
exit( mysql_errno( &mDbConnection ) );
Error( "Can't insert log entry: %s", mysql_error( &mDbConnection ) );
}
}
if ( level <= mSyslogLevel )