From a5fd715245da542ee1af0b05d3f82244ab9d19f9 Mon Sep 17 00:00:00 2001 From: Nidhi Agarwal Date: Wed, 13 May 2020 08:17:44 +0530 Subject: [PATCH] add self node in first cluster node response --- src/ClusterServerPool.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ClusterServerPool.cpp b/src/ClusterServerPool.cpp index 35591d2..9c02056 100644 --- a/src/ClusterServerPool.cpp +++ b/src/ClusterServerPool.cpp @@ -113,9 +113,7 @@ void ClusterServerPool::handleResponse(Handler* h, ConnectConnection* s, Request auto it = mServs.find(addr); Server* serv = it == mServs.end() ? nullptr : it->second; if (!serv) { - if (strstr(p.flags().data(), "myself")) { - serv = s->server(); - } else if (const char* t = strchr(p.addr().data(), '@')) { + if (const char* t = strchr(p.addr().data(), '@')) { addr = String(p.addr().data(), t - p.addr().data()); it = mServs.find(addr); serv = it == mServs.end() ? nullptr : it->second;