Skip to content

Commit 5a3acc6

Browse files
committed
should set update status back to default when ending skips
1 parent 5e5020f commit 5a3acc6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

agent/update/src/main/java/me/hsgamer/topper/agent/update/UpdateAgent.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ public Runnable getSetRunnable() {
125125
UpdateStatus updateStatus = entry.getValue();
126126
if (updateStatus instanceof UpdateStatus.Skip) {
127127
UpdateStatus.Skip skipStatus = (UpdateStatus.Skip) updateStatus;
128-
entry.setValue(skipStatus.decrement());
128+
if (skipStatus.skip()) {
129+
entry.setValue(skipStatus.decrement());
130+
} else {
131+
entry.setValue(UpdateStatus.DEFAULT);
132+
}
129133
} else if (updateStatus == UpdateStatus.RESET) {
130134
dataEntry.setValue((V) null);
131135
entry.setValue(new UpdateStatus.Skip(maxSkips));

0 commit comments

Comments
 (0)