summaryrefslogtreecommitdiff
path: root/deps/hiredis/adapters
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-12-04 19:01:33 +0100
committerantirez <antirez@gmail.com>2019-01-09 17:00:29 +0100
commitd5c54f0b3a908595afead2cbcd93555f2886f22f (patch)
tree21ed76fcff4d2340a094edac83925e5f69fe03de /deps/hiredis/adapters
parent809e3a44a7b53f26ba6bfe49012a88a5203fae3e (diff)
downloadredis-d5c54f0b3a908595afead2cbcd93555f2886f22f.tar.gz
RESP3: hiredis updated with recent version + some RESP3 support.
Diffstat (limited to 'deps/hiredis/adapters')
-rw-r--r--deps/hiredis/adapters/libevent.h4
-rw-r--r--deps/hiredis/adapters/libuv.h9
2 files changed, 5 insertions, 8 deletions
diff --git a/deps/hiredis/adapters/libevent.h b/deps/hiredis/adapters/libevent.h
index 273d8b2dd..7d2bef180 100644
--- a/deps/hiredis/adapters/libevent.h
+++ b/deps/hiredis/adapters/libevent.h
@@ -73,8 +73,8 @@ static void redisLibeventDelWrite(void *privdata) {
static void redisLibeventCleanup(void *privdata) {
redisLibeventEvents *e = (redisLibeventEvents*)privdata;
- event_del(e->rev);
- event_del(e->wev);
+ event_free(e->rev);
+ event_free(e->wev);
free(e);
}
diff --git a/deps/hiredis/adapters/libuv.h b/deps/hiredis/adapters/libuv.h
index ff08c25e1..39ef7cf5e 100644
--- a/deps/hiredis/adapters/libuv.h
+++ b/deps/hiredis/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);
}
}