Commit bc570b15 authored by bjoern's avatar bjoern
Browse files

Bugfix to prevent the churn model to skip flash crowds with small intervals.

parent 472cf859
......@@ -164,6 +164,9 @@ public class ConstantPeerCountChurnModel implements ChurnModel {
clientSessionInfos.put(host.getHostId(), info);
if (hasFlashcrowd && !flashCrowdFinished
&& currentJoin > flashcrowdStart) {
if (currentJoin > flashcrowdStart + flashcrowdInterval){
currentJoin = flashcrowdStart;
}
inFlashcrowd = true;
}
lastJoin = currentJoin;
......@@ -187,6 +190,9 @@ public class ConstantPeerCountChurnModel implements ChurnModel {
clientSessionInfos.put(host.getHostId(), info);
if (hasFlashcrowd && !flashCrowdFinished
&& currentJoin > flashcrowdStart) {
if (currentJoin > flashcrowdStart + flashcrowdInterval){
currentJoin = flashcrowdStart;
}
inFlashcrowd = true;
}
lastJoin = currentJoin;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment