Skip to content

Commit

Permalink
Sockets: fix SSL crash logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Morfent committed Sep 19, 2017
1 parent 8315e8a commit 5b9e1f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sockets.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ if (cluster.isMaster) {
try {
key = fs.readFileSync(key);
} catch (e) {
require('./crashlogger')(`Failed to read the configured SSL private key PEM file:\n${e.stack}`, `Socket process ${cluster.worker.id} (${process.pid})`, true);
require('./crashlogger')(new Error(`Failed to read the configured SSL private key PEM file:\n${e.stack}`), `Socket process ${cluster.worker.id} (${process.pid})`, true);
}
} catch (e) {
console.warn('SSL private key config values will not support HTTPS server option values in the future. Please set it to use the absolute path of its PEM file.');
Expand All @@ -240,7 +240,7 @@ if (cluster.isMaster) {
try {
cert = fs.readFileSync(cert);
} catch (e) {
require('./crashlogger')(`Failed to read the configured SSL certificate PEM file:\n${e.stack}`, `Socket process ${cluster.worker.id} (${process.pid})`, true);
require('./crashlogger')(new Error(`Failed to read the configured SSL certificate PEM file:\n${e.stack}`), `Socket process ${cluster.worker.id} (${process.pid})`, true);
}
} catch (e) {
console.warn('SSL certificate config values will not support HTTPS server option values in the future. Please set it to use the absolute path of its PEM file.');
Expand Down

0 comments on commit 5b9e1f3

Please sign in to comment.