eve: check redis reply in non pipeline mode

We may lose the reply if disconnection happens.
Reconnection is needed.
pull/2391/head
fooinha 10 years ago committed by Victor Julien
parent 2758f82515
commit f6c0abaae7

@ -597,6 +597,8 @@ static int LogFileWriteRedis(LogFileCtx *file_ctx, const char *string, size_t s
file_ctx->redis_setup.key,
string);
/* We may lose the reply if disconnection happens! */
if (reply) {
switch (reply->type) {
case REDIS_REPLY_ERROR:
SCLogWarning(SC_ERR_SOCKET, "Redis error: %s", reply->str);
@ -612,6 +614,9 @@ static int LogFileWriteRedis(LogFileCtx *file_ctx, const char *string, size_t s
break;
}
freeReplyObject(reply);
} else {
SCConfLogReopenRedis(file_ctx);
}
}
return 0;
}

Loading…
Cancel
Save