提交 aedf3bfc 编写于 作者: H Henry Rawas 提交者: JonathanPickett

#43 Redis-sentinel async communication fixes for windows

上级 fe7c28cc
......@@ -235,6 +235,9 @@ static void redisAeReadEvent(aeEventLoop *el, int fd, void *privdata, int mask)
((void)el); ((void)fd); ((void)mask);
redisAsyncHandleRead(e->context);
#ifdef _WIN32
aeWinReceiveDone(fd);
#endif
}
static void redisAeWriteEvent(aeEventLoop *el, int fd, void *privdata, int mask) {
......@@ -284,6 +287,10 @@ static void redisAeCleanup(void *privdata) {
redisAeEvents *e = (redisAeEvents*)privdata;
redisAeDelRead(privdata);
redisAeDelWrite(privdata);
#ifdef _WIN32
aeWinCloseSocket((int)e->fd);
e->fd = 0;
#endif
zfree(e);
}
......@@ -295,6 +302,10 @@ static int redisAeAttach(aeEventLoop *loop, redisAsyncContext *ac) {
if (ac->ev.data != NULL)
return REDIS_ERR;
#ifdef _WIN32
aeWinSocketAttach((int)c->fd);
#endif
/* Create container for context and r/w events */
e = (redisAeEvents*)zmalloc(sizeof(*e));
e->context = ac;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册