Additionally, whenever I am running this sample code, my laptop becomes extremely hot and battery drains fast:
var Client = require('node-torrent');
var client = new Client({logLevel: 'DEBUG'});
var torrent = client.addTorrent('a.torrent');
// when the torrent completes, move it's files to another area
torrent.on('complete', function() {
console.log('complete!');
torrent.files.forEach(function(file) {
var newPath = '/new/path/' + file.path;
fs.rename(file.path, newPath);
// while still seeding need to make sure file.path points to the right place
file.path = newPath;
});
});
Has anyone used this library successfully on Mac OS? Is there a solution for the EMFILE error?
It looks like it is a OS specific issue, and people seem to suggest the same solution: http://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1
But still it does not work for everyone -me included, I still get the error-.
I have tried using graceful-js, but no luck.
Additionally, whenever I am running this sample code, my laptop becomes extremely hot and battery drains fast:
Has anyone used this library successfully on Mac OS? Is there a solution for the EMFILE error?