Fixes issue with file descriptor on OSX
This commit is contained in:
parent
cb49f4d08e
commit
ce0be3c1f5
|
@ -58,8 +58,7 @@ class TorProcess extends EventEmitter {
|
||||||
temp.open('tor-router', (err, info) => {
|
temp.open('tor-router', (err, info) => {
|
||||||
if (err) return callback(err);
|
if (err) return callback(err);
|
||||||
|
|
||||||
fs.write(info.fd, text);
|
fs.writeFile(info.path, text, (err) => {
|
||||||
fs.close(info.fd, (err) => {
|
|
||||||
callback(err, info.path);
|
callback(err, info.path);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue