Node-redis: Callback not called on ETIMEDOUT

Created on 16 Dec 2016  路  1Comment  路  Source: NodeRedis/node-redis

node_redis versions 2.6.2 and 2.6.3
Node v5.5.0
OS Win 10

Hi, I am having problems with getting a key using either client.get or promisified client.getAsync. When redis server host is unreachable, callback is not called /or promise is not ever resolved/rejected, although hooked function on client.on('error', ...) is called with following error stack:

Error: Redis connection to ...  failed - connect ETIMEDOUT ...
    at Object.exports._errnoException (util.js:856:11)
    at exports._exceptionWithHostPort (util.js:879:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1062:14)

Wouldn't be useful to also throw this error to the .get method?

question

>All comments

@jiri-smolik the reason is that the function itself is never called. I know this is inconvenient but there is no nice solution for this right now. If you want the command to fail right away, please deactivate the offline queue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gpascale picture gpascale  路  4Comments

Mickael-van-der-Beek picture Mickael-van-der-Beek  路  6Comments

adamgajzlerowicz picture adamgajzlerowicz  路  4Comments

dotSlashLu picture dotSlashLu  路  5Comments

yuany picture yuany  路  4Comments