v0.4.19: fix post-move publish race in VideoCache.download
Some checks failed
build / build (push) Has been cancelled

Reviewer-flagged: v0.4.18 only checked epoch BEFORE Files.move. The window
between the move completing and READY.put / "완료" chat was still racy —
if /videoCache clear landed in that window, clearAll would epoch++ +
clear READY + delete files on disk, then the download thread would do
READY.put(url, finalPath) anyway, resurrecting a cleared entry and emitting
a stale "완료" message.

Add a second epoch check immediately AFTER Files.move(): if the epoch
changed, delete finalPath and return without publishing. The pre-move
check is kept too — it lets the common cancel-during-read case skip the
wasted move/delete round-trip.
This commit is contained in:
tkrmagid
2026-05-16 22:51:32 +09:00
parent de723fd0b4
commit d11289309b
2 changed files with 19 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ org.gradle.configuration-cache=false
# Mod
mod_id=video_player
mod_version=0.4.18
mod_version=0.4.19
maven_group=com.ejclaw.videoplayer
archives_base_name=video_player