diff options
author | Yossi Gottlieb <yossigo@gmail.com> | 2018-11-04 09:52:02 +0200 |
---|---|---|
committer | Yossi Gottlieb <yossigo@gmail.com> | 2018-11-04 10:04:53 +0200 |
commit | 9ce15c4b39253792899cbbe338cee430811d0eb2 (patch) | |
tree | bc9d3ea04cd2dc2313fa84f505023725bd563f7a /adapters/libuv.h | |
parent | 970e5fa0a39693efdd89b1fc65c5472a0b7b4912 (diff) |
Fix errors not propagating properly with libuv.h.
Diffstat (limited to 'adapters/libuv.h')
-rw-r--r-- | adapters/libuv.h | 9 |
1 files 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); } } |