mirror of https://github.com/apache/cassandra
simplify initClient gossip loop
patch by Adrian Nistor and jbellis for CASSANDRA-5662
This commit is contained in:
parent
fc5044f591
commit
9ba0ff03e2
|
|
@ -395,16 +395,14 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// sleep a while to allow gossip to warm up (the other nodes need to know about this one before they can reply).
|
// sleep a while to allow gossip to warm up (the other nodes need to know about this one before they can reply).
|
||||||
boolean isUp = false;
|
outer:
|
||||||
while (!isUp)
|
while (true)
|
||||||
{
|
{
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
for (InetAddress address : Gossiper.instance.getLiveMembers())
|
for (InetAddress address : Gossiper.instance.getLiveMembers())
|
||||||
{
|
{
|
||||||
if (!Gossiper.instance.isFatClient(address))
|
if (!Gossiper.instance.isFatClient(address))
|
||||||
{
|
break outer;
|
||||||
isUp = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue