in common/notificationconsumer.cpp [68:104]
uint64_t swss::NotificationConsumer::readData()
{
SWSS_LOG_ENTER();
redisReply *reply = nullptr;
if (redisGetReply(m_subscribe->getContext(), reinterpret_cast<void**>(&reply)) != REDIS_OK)
{
SWSS_LOG_ERROR("failed to read redis reply on channel %s", m_channel.c_str());
throw std::runtime_error("Unable to read redis reply");
}
else
{
RedisReply r(reply);
processReply(reply);
}
reply = nullptr;
int status;
do
{
status = redisGetReplyFromReader(m_subscribe->getContext(), reinterpret_cast<void**>(&reply));
if(reply != nullptr && status == REDIS_OK)
{
RedisReply r(reply);
processReply(reply);
}
}
while(reply != nullptr && status == REDIS_OK);
if (status != REDIS_OK)
{
throw std::runtime_error("Unable to read redis reply");
}
return 0;
}