🐛 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:
Ricardo Espinoza
2021-04-30 16:38:51 -04:00
committed by GitHub
parent 7c418aafe7
commit efd40ea7a6

View File

@@ -451,7 +451,7 @@ export class Redis implements INodeType {
});
client.on('ready', async (err: Error | null) => {
try {
if (operation === 'info') {
const clientInfo = util.promisify(client.info).bind(client);
const result = await clientInfo();
@@ -523,6 +523,9 @@ export class Redis implements INodeType {
client.quit();
resolve(this.prepareOutputData(returnItems));
}
} catch (error) {
reject(error);
}
});
});
}