Skip to content

Commit

Permalink
sometimes CPU info is not available #3957
Browse files Browse the repository at this point in the history
  • Loading branch information
zadam committed Dec 3, 2023
1 parent 929f7f3 commit c35167f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/www.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ function startTrilium() {
log.info(JSON.stringify(appInfo, null, 2));

const cpuInfos = require('os').cpus();
log.info(`CPU model: ${cpuInfos[0].model}, logical cores: ${cpuInfos.length} freq: ${cpuInfos[0].speed} Mhz`); // for perf. issues it's good to know the rough configuration
if (cpuInfos && cpuInfos[0] !== undefined) { // https://github.com/zadam/trilium/pull/3957
log.info(`CPU model: ${cpuInfos[0].model}, logical cores: ${cpuInfos.length} freq: ${cpuInfos[0].speed} Mhz`); // for perf. issues it's good to know the rough configuration
}

const httpServer = startHttpServer();

Expand Down

0 comments on commit c35167f

Please sign in to comment.