Fix node deprecation warning about calling fs.writeFile without cb
This commit is contained in:
parent
8306d2d1b6
commit
25c663c110
|
|
@ -48,8 +48,12 @@ function getTorIPs(cb) {
|
||||||
retrieveIPs(function (err, ips) {
|
retrieveIPs(function (err, ips) {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
cb(false, ips);
|
cb(false, ips);
|
||||||
fs.writeFile(path.join(__dirname, "..", "torlist"),
|
const destination = path.join(__dirname, "..", "torlist");
|
||||||
ips.join("\n"));
|
fs.writeFile(destination,
|
||||||
|
ips.join("\n"),
|
||||||
|
error => {
|
||||||
|
LOGGER.error("Failed to write to %s: %s", destination, error.stack);
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue