Skip to content

Commit

Permalink
Fix #258: Fixing crash when changing network while opening TTL
Browse files Browse the repository at this point in the history
  • Loading branch information
araujoarthur0 committed Jun 19, 2020
1 parent e9db00c commit 6c14a71
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ var launchDate = new Date();
var recommendPunchIn = false;
setTimeout(() => { recommendPunchIn = true; }, 30 * 60 * 1000);

process.on('uncaughtException', function(err) {
if (!err.message.includes('net::ERR_NETWORK_CHANGED')) {
console.error((new Date).toUTCString() + ' uncaughtException:', err.message);
console.error(err.stack);
process.exit(1);
}
});

function checkIdleAndNotify() {
if (recommendPunchIn) {
recommendPunchIn = false;
Expand Down

0 comments on commit 6c14a71

Please sign in to comment.