Skip to content

fix: make CaptureManager.stop() idempotent during drain#98

Open
terbin wants to merge 1 commit into
Avanatiker:1.21.4from
terbin:fix/capture-stop-idempotent
Open

fix: make CaptureManager.stop() idempotent during drain#98
terbin wants to merge 1 commit into
Avanatiker:1.21.4from
terbin:fix/capture-stop-idempotent

Conversation

@terbin
Copy link
Copy Markdown

@terbin terbin commented May 19, 2026

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).

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant