summaryrefslogtreecommitdiff
path: root/adapters
diff options
context:
space:
mode:
authorYossi Gottlieb <yossigo@gmail.com>2018-11-04 09:52:02 +0200
committerYossi Gottlieb <yossigo@gmail.com>2018-11-04 10:04:53 +0200
commit9ce15c4b39253792899cbbe338cee430811d0eb2 (patch)
treebc9d3ea04cd2dc2313fa84f505023725bd563f7a /adapters
parent970e5fa0a39693efdd89b1fc65c5472a0b7b4912 (diff)
Fix errors not propagating properly with libuv.h.
Diffstat (limited to 'adapters')
-rw-r--r--adapters/libuv.h9
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);
}
}