Ensure to check the auth command return value

refs #4991
This commit is contained in:
Michael Friedrich 2017-03-02 10:18:41 +01:00
parent b3a80e16b2
commit a8587f5697

View File

@ -67,6 +67,10 @@ void RedisWriter::ConnectionThreadProc(void)
if (!password.IsEmpty()) {
redisReply *reply = reinterpret_cast<redisReply *>(redisCommand(m_Context, "AUTH %s", password.CStr()));
//TODO: Verify if we can continue here.
if (!reply)
continue;
if (reply->type == REDIS_REPLY_STATUS || reply->type == REDIS_REPLY_ERROR) {
Log(LogInformation, "RedisWriter")
<< "AUTH: " << reply->str;