limitations under the License.
*/
+/*
+ * This source code is part of the near-RT RIC (RAN Intelligent Controller)
+ * platform project (RICP).
+*/
+
#include "private/redis/asynchiredisclustercommanddispatcher.hpp"
#include <algorithm>
#include <cstring>
void disconnectCb(const redisClusterAsyncContext* acc, const redisAsyncContext* ac, int status)
{
- if (status)
- {
- std::ostringstream msg;
- msg << "redis cluster instance disconnected, fd: " << ac->c.fd
- << ", status: " << ac->err;
- logDebugOnce(msg.str());
- }
+ std::ostringstream msg;
+ msg << "redis cluster instance disconnected, status: " << ac->err
+ << ", " << ac->errstr << ", fd: " << ac->c.fd << std::endl;
+ logDebugOnce(msg.str());
+
auto instance(static_cast<AsyncHiredisClusterCommandDispatcher*>(acc->data));
instance->handleDisconnect(ac);
}