Skip to content

Commit

Permalink
Fix errors not propagating properly with libuv.h.
Browse files Browse the repository at this point in the history
  • Loading branch information
yossigo committed Nov 4, 2018
1 parent 970e5fa commit 9ce15c4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions adapters/libuv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 9ce15c4

Please sign in to comment.