Native: fail-safes for simulated node without config file (#3486)

* LinuxInput: only close if file descriptor is assigned

* Native: set some defaults if no configuration file found
This commit is contained in:
GUVWAF
2024-03-24 13:42:32 -05:00
committed by GitHub
co-authored by GitHub
parent b960dc1b41
commit 77fb230baa
3 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -24,7 +24,8 @@ LinuxInput::LinuxInput(const char *name) : concurrency::OSThread(name)
void LinuxInput::deInit()
{
close(fd);
if (fd >= 0)
close(fd);
}
int32_t LinuxInput::runOnce()