Fix misinterpretation of voteBot.warnSecs master
authorJan Dittberner <jandd@cacert.org>
Fri, 6 Apr 2018 17:31:48 +0000 (19:31 +0200)
committerJan Dittberner <jandd@cacert.org>
Fri, 6 Apr 2018 17:31:48 +0000 (19:31 +0200)
Fixes #1434

src/main/java/org/cacert/votebot/shared/CAcertVoteMechanics.java

index fb7415c..03bcca2 100644 (file)
@@ -152,7 +152,7 @@ public class CAcertVoteMechanics {
         votes.clear();
 
         this.warnTime = Calendar.getInstance();
-        this.warnTime.add(Calendar.SECOND, Math.toIntExact(timeout - warn));
+        this.warnTime.add(Calendar.SECOND, Math.toIntExact(warn));
         this.warned = false;
 
         this.endTime = Calendar.getInstance();