summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}
}