WorldTools icon indicating copy to clipboard operation
WorldTools copied to clipboard

fix: make CaptureManager.stop() idempotent during drain

Open terbin opened this issue 6 months ago • 0 comments

stop() guarded only on !capturing, but the StorageFlow drain runs for up to a minute on big captures with capturing still true. Re-entries in that window (stale button clicks, onClientDisconnect on reconnect) re-emitted the whole HotCache and spammed "Stopping capture..." chat. Add a stopping sentinel reset by the drain's cleanup block.

Verification

No double-stop and no "Stopping capture..." chat spam on disconnect-during-drain (verified by triggering disconnect while a multi-second drain was in flight).

terbin avatar May 19 '26 01:05 terbin