Skip to content

Commit

Permalink
封禁时,将 Peer 从 PCB 缓存中移除
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghost-chu committed Jul 13, 2024
1 parent fcde5ea commit ff47db6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ private void reloadConfig() {
boolean ban = rewind > rewindMaximumDifference;
if (ban) {
clientTask.setRewindCounter(clientTask.getRewindCounter() + 1);
progressRecorder.invalidate(peerIpString); // 封禁时,移除缓存
}

return new CheckResult(getClass(), ban ? PeerAction.BAN : PeerAction.NO_ACTION, 0, new TranslationComponent(Lang.PCB_RULE_PROGRESS_REWIND), new TranslationComponent(Lang.MODULE_PCB_PEER_BAN_REWIND, percent(clientProgress), percent(actualProgress), percent(lastRecord), percent(rewind), percent(rewindMaximumDifference)));
}
//return new CheckResult(getClass(), PeerAction.NO_ACTION, "N/A", String.format(Lang.MODULE_PCB_PEER_BAN_INCORRECT_PROGRESS, percent(clientProgress), percent(actualProgress), percent(difference)));
Expand Down

0 comments on commit ff47db6

Please sign in to comment.