summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Nunberg <mnunberg@users.noreply.github.com>2018-11-30 06:52:39 -0500
committerGitHub <noreply@github.com>2018-11-30 06:52:39 -0500
commit91289c81ee19c6fcef88960fc91eda7d32dae364 (patch)
tree12934f0458e55d02d99d58600c0b381524bbca61
parenta7516ada53c8945558e244067d985d948063f0c3 (diff)
parent9ce15c4b39253792899cbbe338cee430811d0eb2 (diff)
Merge pull request #624 from yossigo/fix/libuv-errors
Fix errors not propagating properly with libuv.h.
-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);
}
}