diff --git a/src/analytics/OpServerProxy.cc b/src/analytics/OpServerProxy.cc index 8e60b1bf3a3..fcc9b21ba40 100644 --- a/src/analytics/OpServerProxy.cc +++ b/src/analytics/OpServerProxy.cc @@ -231,7 +231,11 @@ class OpServerProxy::OpServerImpl { } void toConnectCallbackProcess(const redisAsyncContext *c, void *r, void *privdata) { - //Handle the AUTH callback + if (r == NULL) { + LOG(DEBUG, "In toConnectCallbackProcess.. NULL Reply"); + return; + } + // Handle the AUTH callback redisReply reply = *reinterpret_cast(r); if (reply.type != REDIS_REPLY_ERROR) { { @@ -252,7 +256,11 @@ class OpServerProxy::OpServerImpl { } void fromConnectCallbackProcess(const redisAsyncContext *c, void *r, void *privdata) { - //Handle the AUTH callback + if (r == NULL) { + LOG(DEBUG, "In fromConnectCallbackProcess.. NULL Reply"); + return; + } + // Handle the AUTH callback redisReply reply = *reinterpret_cast(r); if (reply.type != REDIS_REPLY_ERROR) { ConnectionState::GetInstance()->Update(ConnectionType::REDIS_UVE, diff --git a/src/query_engine/QEOpServerProxy.cc b/src/query_engine/QEOpServerProxy.cc index b5b2af2a79b..8441307a674 100644 --- a/src/query_engine/QEOpServerProxy.cc +++ b/src/query_engine/QEOpServerProxy.cc @@ -894,16 +894,20 @@ class QEOpServerProxy::QEOpServerImpl { } void ConnectCallbackProcess(uint8_t cnum, const redisAsyncContext *c, void *r, void *privdata) { - QE_LOG_NOQID(DEBUG,"In ConnectCallbackProcess.."); + if (r == NULL) { + QE_LOG_NOQID(DEBUG, "In ConnectCallbackProcess.. NULL Reply"); + return; + } redisReply reply = *reinterpret_cast(r); if (reply.type != REDIS_REPLY_ERROR) { + QE_LOG_NOQID(DEBUG, "In ConnectCallbackProcess.."); ConnectionState::GetInstance()->Update(ConnectionType::REDIS_QUERY, "Query", ConnectionStatus::UP, conns_[cnum]->Endpoint(), std::string()); qosp_->evm_->io_service()->post( boost::bind(&QEOpServerImpl::ConnUpPostProcess, this, cnum)); - }else { + } else { QE_LOG_NOQID(ERROR,"In connectCallbackProcess.. Error"); QE_ASSERT(reply.type != REDIS_REPLY_ERROR); }