From f4b32ad3adade8151837394c2130fdcbf1e5f1e4 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sat, 17 Aug 2013 18:45:21 -0500 Subject: [PATCH] Make config saving synchronous --- config.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/config.js b/config.js index b8c5b69a..4d21e58c 100644 --- a/config.js +++ b/config.js @@ -49,12 +49,7 @@ function save(cfg, file) { if(k !== "nodemailer" && k !== "loaded") x[k] = cfg[k]; } - fs.writeFile(file, JSON.stringify(x, null, 4), function (err) { - if(err) { - Logger.errlog.log("Failed to save config"); - Logger.errlog.log(err); - } - }); + fs.writeFileSync(file, JSON.stringify(x, null, 4)); } exports.load = function (Server, file, callback) {