mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-23 04:39:08 +00:00
🐛 Fix issue of Redis never returning (#1716)
Fixes #1709. When the node returned an error the reject method was not called. Hence, the process kept running forever.
This commit is contained in:
@@ -451,7 +451,7 @@ export class Redis implements INodeType {
|
|||||||
});
|
});
|
||||||
|
|
||||||
client.on('ready', async (err: Error | null) => {
|
client.on('ready', async (err: Error | null) => {
|
||||||
|
try {
|
||||||
if (operation === 'info') {
|
if (operation === 'info') {
|
||||||
const clientInfo = util.promisify(client.info).bind(client);
|
const clientInfo = util.promisify(client.info).bind(client);
|
||||||
const result = await clientInfo();
|
const result = await clientInfo();
|
||||||
@@ -523,6 +523,9 @@ export class Redis implements INodeType {
|
|||||||
client.quit();
|
client.quit();
|
||||||
resolve(this.prepareOutputData(returnItems));
|
resolve(this.prepareOutputData(returnItems));
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user