fix: shutdown

restore shutdown
This commit is contained in:
cv
2021-10-28 14:43:46 +02:00
parent c8e4704daf
commit 1ffd6ff7b0
+18
View File
@@ -163,3 +163,21 @@ export const startServer = async (overrideConfig = null) => {
return returnMessage;
};
export const shutdown = async () => {
console.log('Node service shutdown');
user.event('NODE', 'shutdown', 'requesting node shutfown').send();
// shutdown express server
server.close();
// shutdown OSC Server
shutdownOSCServer();
// shutdown OSC Client
oscClient.close();
// shutdown timer
global.timer.shutdown();
};