diff options
| author | Mikhail Burakov <mburakov@mailbox.org> | 2023-01-07 11:20:10 +0100 |
|---|---|---|
| committer | Mikhail Burakov <mburakov@mailbox.org> | 2023-01-07 11:20:10 +0100 |
| commit | f66472ada5ed9d137ff593cf97dd443666f7a860 (patch) | |
| tree | 6f523e01a542e9f575d641a3b7070520bf00c422 /main.c | |
| parent | d62c48945382a440a5e91876a58a1d91e3da5b1d (diff) | |
Return error state on failed lua initialization
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -408,8 +408,8 @@ static void OnMqttSubscribeAck(void* user, bool success) { g_service.lua_state = luaL_newstate(); if (!g_service.lua_state) { - LOGW("Failed to allocate lua state (%s)", strerror(errno)); - OnSignal(SIGTERM); + LOGE("Failed to allocate lua state (%s)", strerror(errno)); + OnSignal(SIGABRT); return; } @@ -421,8 +421,8 @@ static void OnMqttSubscribeAck(void* user, bool success) { DIR* current_dir = opendir("."); if (!current_dir) { - LOGW("Failed to open current dir (%s)", strerror(errno)); - OnSignal(SIGTERM); + LOGE("Failed to open current dir (%s)", strerror(errno)); + OnSignal(SIGABRT); return; } for (struct dirent* item; (item = readdir(current_dir));) { |
