diff --git a/system/jlib/jsocket.cpp b/system/jlib/jsocket.cpp index 962d328364b..665f7a42348 100644 --- a/system/jlib/jsocket.cpp +++ b/system/jlib/jsocket.cpp @@ -1538,20 +1538,8 @@ void CSocket::connect_wait(unsigned timems) bool exit = false; int err; unsigned refuseddelay = 1; - while (!exit) { -#ifdef CENTRAL_NODE_RANDOM_DELAY - ForEachItemIn(cn,CentralNodeArray) { - const SocketEndpoint &ep=CentralNodeArray.item(cn); - if (ep.ipequals(targetip)) { - unsigned sleeptime = getRandom() % 1000; - StringBuffer s; - ep.getHostText(s); - DBGLOG("Connection to central node %s - sleeping %d milliseconds", s.str(), sleeptime); - Sleep(sleeptime); - break; - } - } -#endif + while (!exit) + { unsigned remaining; exit = tm.timedout(&remaining); bool blockselect = exit; // if last time round block @@ -6189,15 +6177,6 @@ ISocketBufferReader *createSocketBufferReader(const char *trc) } -extern jlib_decl void markNodeCentral(SocketEndpoint &ep) -{ -#ifdef CENTRAL_NODE_RANDOM_DELAY - CriticalBlock block(CSocket::crit); - CentralNodeArray.append(ep); -#endif -} - - static CSocket *prepareSocket(unsigned idx,const SocketEndpoint &ep, ISocketConnectNotify &inotify) { Owned sock = new CSocket(ep,sm_tcp,NULL); diff --git a/system/jlib/jsocket.hpp b/system/jlib/jsocket.hpp index 6587e9410ff..a6c794af4b3 100644 --- a/system/jlib/jsocket.hpp +++ b/system/jlib/jsocket.hpp @@ -633,8 +633,6 @@ interface ISocketBufferReader: extends IInterface extern jlib_decl ISocketBufferReader *createSocketBufferReader(const char *trc=NULL); -extern jlib_decl void markNodeCentral(SocketEndpoint &ep); // random delay for linux - interface ISocketConnectNotify { public: diff --git a/thorlcr/slave/thslavemain.cpp b/thorlcr/slave/thslavemain.cpp index 2f0c496a8cf..17bea9fb450 100644 --- a/thorlcr/slave/thslavemain.cpp +++ b/thorlcr/slave/thslavemain.cpp @@ -434,7 +434,6 @@ int main( int argc, const char *argv[] ) SocketEndpoint masterEp(master); localHostToNIC(masterEp); setMasterPortBase(masterEp.port); - markNodeCentral(masterEp); if (RegisterSelf(masterEp)) {