Tried to fix occasional crash when saving related to getMac

This commit is contained in:
Danielv123 committed 2017-09-16 16:47:16 +02:00
1 parent 08143b7b84
commit 8742e34d9f
1 file changed
+4
+4
View File
@@ -420,6 +420,7 @@ function instanceManagement() {
playerCount: instanceInfo.playerCount || 0, playerCount: instanceInfo.playerCount || 0,
instanceName: instance, instanceName: instance,
} }
try {
require('getmac').getMac(function (err, mac) { require('getmac').getMac(function (err, mac) {
if (err) throw err if (err) throw err
payload.mac = mac payload.mac = mac
@@ -434,6 +435,9 @@ function instanceManagement() {
} }
}); });
}); });
} catch (e){
console.log("##### getMac crashed, but we don't really give a shit because we are probably closing down #####");
}
},1000)}); },1000)});
} }
}); });