diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2013-07-02 19:24:02 +0200 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2013-07-02 19:24:02 +0200 |
commit | fc55afb1b672bd3e4f47c3befdcf782013fedac3 (patch) | |
tree | d6814d0d039decb9ddf678bb53ea799a0bf3e9f4 | |
parent | bcf83543762577a9b0f5625c848b7061cc980f30 (diff) |
Made example-ae work again
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | example-ae.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -73,7 +73,7 @@ hiredis-example-ae: @false else hiredis-example-ae: example-ae.c adapters/ae.h $(STLIBNAME) - $(CC) -o $@ $(REAL_CFLAGS) $(REAL_LDFLAGS) -I$(AE_DIR) $(AE_DIR)/ae.o $(AE_DIR)/zmalloc.o example-ae.c $(STLIBNAME) + $(CC) -o $@ $(REAL_CFLAGS) $(REAL_LDFLAGS) -I$(AE_DIR) $(AE_DIR)/ae.o $(AE_DIR)/zmalloc.o $(AE_DIR)/../deps/jemalloc/lib/libjemalloc.a -pthread example-ae.c $(STLIBNAME) endif hiredis-%: %.o $(STLIBNAME) diff --git a/example-ae.c b/example-ae.c index 5ed34a3..0484a73 100644 --- a/example-ae.c +++ b/example-ae.c @@ -32,6 +32,8 @@ void disconnectCallback(const redisAsyncContext *c, int status) { return; } printf("Disconnected...\n"); + + aeStop(loop); } int main (int argc, char **argv) { @@ -44,7 +46,7 @@ int main (int argc, char **argv) { return 1; } - loop = aeCreateEventLoop(); + loop = aeCreateEventLoop(64); redisAeAttach(loop, c); redisAsyncSetConnectCallback(c,connectCallback); redisAsyncSetDisconnectCallback(c,disconnectCallback); |