Fix infinite loop
This commit is contained in:
parent
b14fdc00c9
commit
29a348eb8a
@ -29,12 +29,12 @@ public class NetHandlerFD extends NetEventHandlerAbstract {
|
|||||||
@Override
|
@Override
|
||||||
public void beat() {
|
public void beat() {
|
||||||
hosts.forEach(h-> alive.computeIfPresent(h.getId(),(k, v) -> {
|
hosts.forEach(h-> alive.computeIfPresent(h.getId(),(k, v) -> {
|
||||||
if(v == -1) return 1;
|
if(v == -1) return 0;
|
||||||
if(v > NetManager.FD_MAX_TRIES)
|
if(v > NetManager.FD_MAX_TRIES)
|
||||||
crashNextAsync(NetEvent.Message(h, Message.EMPTY()));
|
crashNextAsync(NetEvent.Message(h, Message.EMPTY()));
|
||||||
else
|
else
|
||||||
sendNextSync(NetEvent.MessageHRTB(h));
|
sendNextSync(NetEvent.MessageHRTB(h));
|
||||||
return v;
|
return v+1;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,11 +37,13 @@ public abstract class ParamDetector {
|
|||||||
System.out.println("Starting Process with WindowWidth of "+windowWidth+" (~ x"+windowWidthMult+").");
|
System.out.println("Starting Process with WindowWidth of "+windowWidth+" (~ x"+windowWidthMult+").");
|
||||||
NetManager.WINDOW_WIDTH = windowWidth;
|
NetManager.WINDOW_WIDTH = windowWidth;
|
||||||
|
|
||||||
|
NetManager.INTERNAL_WAIT = 500;
|
||||||
|
|
||||||
//We might want to PingPong To set Custom Timing Limitations....
|
//We might want to PingPong To set Custom Timing Limitations....
|
||||||
NetManager.FD_MAX_TRIES = 3;
|
NetManager.FD_MAX_TRIES = 10;
|
||||||
NetManager.FD_WAIT = 1000;
|
NetManager.FD_WAIT = 1000;
|
||||||
|
|
||||||
NetManager.SL_MAX_TRIES = 8;
|
NetManager.SL_MAX_TRIES = 8;
|
||||||
NetManager.INTERNAL_WAIT = 500;
|
NetManager.SL_WAIT = NetManager.INTERNAL_WAIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user