Fixed crash on pub/sub with custom formats.

master
Nicolas Favre-Felix 13 years ago
parent 97d8afd46e
commit 4fde286233

@ -6,7 +6,7 @@ HTTP_PARSER_OBJS=http-parser/http_parser.o
DEPS=$(FORMAT_OBJS) $(HIREDIS_OBJ) $(JANSSON_OBJ) $(HTTP_PARSER_OBJS)
OBJS=webdis.o cmd.o worker.o slog.o server.o libb64/cencode.o acl.o md5/md5.o http.o client.o websocket.o pool.o conf.o $(DEPS)
CFLAGS=-O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser
CFLAGS=-O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser
LDFLAGS=-levent -pthread
all: $(OUT) Makefile

@ -45,6 +45,9 @@ custom_type_reply(redisAsyncContext *c, void *r, void *privdata) {
http_response_set_header(&resp, "Content-Length", "0");
http_response_set_keep_alive(&resp, cmd->keep_alive);
http_response_write(&resp, cmd->fd);
if(!cmd_is_subscribe(cmd)) {
cmd_free(cmd);
}
}

Loading…
Cancel
Save