Skip to content

Commit

Permalink
Made example-ae work again
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdubbelboer committed Jul 2, 2013
1 parent bcf8354 commit fc55afb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion example-ae.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ void disconnectCallback(const redisAsyncContext *c, int status) {
return;
}
printf("Disconnected...\n");

aeStop(loop);
}

int main (int argc, char **argv) {
Expand All @@ -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);
Expand Down

0 comments on commit fc55afb

Please sign in to comment.