Skip to content

Commit

Permalink
🥅 Exit on task end
Browse files Browse the repository at this point in the history
  • Loading branch information
pvillaverde committed May 16, 2024
1 parent 08df6df commit 3f6fc31
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ switch (task) {
}

if (!keepRuning) {
connection.end();
mqttService.end();
try {
connection.end();
mqttService.end();
} catch (_error) {
Deno.exit(0);
}
}

0 comments on commit 3f6fc31

Please sign in to comment.