Forcing twitter.js to exit when the processor 'stops'.

This commit is contained in:
Martin Donnelly 2020-08-21 09:02:43 +01:00
parent bfdc2ae28c
commit 04378b56ee

View File

@ -136,6 +136,10 @@ const accounts = [
})
.on("ping", () => console.log('>> ping'))
.on("error", error => console.error(error))
.on("end", response => console.log('Stopped!'));
.on("end", response => {
console.error('Stopped!');
console.log(response);
process.exit(1);
});
})();