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

betimer picture betimer  路  5Comments

twappworld picture twappworld  路  7Comments

jackycchen picture jackycchen  路  4Comments

shmendo picture shmendo  路  6Comments

adamgajzlerowicz picture adamgajzlerowicz  路  4Comments