mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08: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:
parent
7c418aafe7
commit
efd40ea7a6
|
@ -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);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue