mirror of
https://github.com/unraid/api.git
synced 2026-01-07 17:19:52 -06:00
fix: move exit message to child_process on successful http listen
This commit is contained in:
@@ -214,6 +214,10 @@ if (isNaN(parseInt(port, 10))) {
|
||||
stoppableServer.on('listening', () => {
|
||||
// Set permissions
|
||||
fs.chmodSync(port, 660);
|
||||
|
||||
process.once('exit', () => {
|
||||
console.info('👋 Farewell. UNRAID API shutting down!');
|
||||
});
|
||||
});
|
||||
|
||||
stoppableServer.on('error', async (error: NodeJS.ErrnoException) => {
|
||||
@@ -287,10 +291,6 @@ if (isNaN(parseInt(port, 10))) {
|
||||
globalErrorHandler(error);
|
||||
}
|
||||
});
|
||||
|
||||
process.once('exit', () => {
|
||||
console.info('👋 Farewell. UNRAID API shutting down!');
|
||||
});
|
||||
}
|
||||
|
||||
// Main ws server
|
||||
|
||||
Reference in New Issue
Block a user