mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Fix shutdown if terminating before hooks are initialized (#8047)
If the app receives termination signal before hooks have been initialised, the would be objet is undefined error. This PR fixes that.
This commit is contained in:
@@ -39,7 +39,7 @@ export class Webhook extends BaseCommand {
|
||||
this.logger.info('\nStopping n8n...');
|
||||
|
||||
try {
|
||||
await this.externalHooks.run('n8n.stop', []);
|
||||
await this.externalHooks?.run('n8n.stop', []);
|
||||
|
||||
setTimeout(async () => {
|
||||
// In case that something goes wrong with shutdown we
|
||||
|
||||
Reference in New Issue
Block a user