From 04378b56eedf744e8fe83dc33fcf37378a3f9f48 Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Fri, 21 Aug 2020 09:02:43 +0100 Subject: [PATCH] Forcing twitter.js to exit when the processor 'stops'. --- twitter.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/twitter.js b/twitter.js index 6d1457a..b5a48e9 100644 --- a/twitter.js +++ b/twitter.js @@ -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); + }); })();