mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 06:27:45 +00:00
Improved some errorhandling
This commit is contained in:
parent
90eb03df95
commit
6d3d90211a
2 changed files with 8 additions and 1 deletions
6
deps/watchdog/Watchdog.h
vendored
6
deps/watchdog/Watchdog.h
vendored
|
@ -119,7 +119,13 @@ protected:
|
|||
// keep watching for modifications every ms milliseconds
|
||||
auto ms = std::chrono::milliseconds( 500 );
|
||||
while( mWatching ) {
|
||||
if( mFileWatchers.empty() )
|
||||
{
|
||||
std::this_thread::sleep_for( ms );
|
||||
continue;
|
||||
}
|
||||
do {
|
||||
|
||||
// iterate through each watcher and check for modification
|
||||
std::lock_guard<std::mutex> lock( mMutex );
|
||||
auto end = mFileWatchers.end();
|
||||
|
|
|
@ -17,7 +17,8 @@ bool Core::ConfigMgr::loadConfig( const std::string& configName )
|
|||
|
||||
if( !fs::exists( configFile ) )
|
||||
{
|
||||
copyDefaultConfig( configName );
|
||||
if( !copyDefaultConfig( configName ) )
|
||||
return false;
|
||||
}
|
||||
|
||||
m_pInih = std::unique_ptr< INIReader >( new INIReader( configFile.string() ) );
|
||||
|
|
Loading…
Add table
Reference in a new issue