File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ bool Logger::init(const LoggerConfig &config) {
8989 const bool shouldCreateTask = _config.enableSyncTask && _config.syncIntervalMS > 0 ;
9090
9191 if (shouldCreateTask) {
92+ _running = true ;
9293 BaseType_t result = xTaskCreatePinnedToCore (
9394 syncTaskThunk,
9495 kSyncTaskName ,
@@ -99,18 +100,17 @@ bool Logger::init(const LoggerConfig &config) {
99100 _config.coreId );
100101
101102 if (result != pdPASS) {
103+ _running = false ;
102104 LockGuard guard (_mutex);
103105 _logs.clear ();
104106 _config = LoggerConfig{};
105107 _logLevel = _config.consoleLogLevel ;
106108 vSemaphoreDelete (_mutex);
107109 _mutex = nullptr ;
108110 _syncTask = nullptr ;
109- _running = false ;
110111 return false ;
111112 }
112113
113- _running = true ;
114114 }
115115
116116 _initialized = true ;
You can’t perform that action at this time.
0 commit comments