From 9ce15c4b39253792899cbbe338cee430811d0eb2 Mon Sep 17 00:00:00 2001 From: Yossi Gottlieb Date: Sun, 4 Nov 2018 09:52:02 +0200 Subject: [PATCH] Fix errors not propagating properly with libuv.h. --- adapters/libuv.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/adapters/libuv.h b/adapters/libuv.h index ff08c25..39ef7cf 100644 --- a/adapters/libuv.h +++ b/adapters/libuv.h @@ -15,15 +15,12 @@ typedef struct redisLibuvEvents { static void redisLibuvPoll(uv_poll_t* handle, int status, int events) { redisLibuvEvents* p = (redisLibuvEvents*)handle->data; + int ev = (status ? p->events : events); - if (status != 0) { - return; - } - - if (p->context != NULL && (events & UV_READABLE)) { + if (p->context != NULL && (ev & UV_READABLE)) { redisAsyncHandleRead(p->context); } - if (p->context != NULL && (events & UV_WRITABLE)) { + if (p->context != NULL && (ev & UV_WRITABLE)) { redisAsyncHandleWrite(p->context); } }