Skip to content

Give a remote discard the time an accept gets - #816

Merged
SimonCropp merged 1 commit into
mainfrom
fix-discard-short-timeout
Aug 22, 2026
Merged

Give a remote discard the time an accept gets#816
SimonCropp merged 1 commit into
mainfrom
fix-discard-short-timeout

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

Discard and DiscardAll used ViewerClient.ShortTimeout, which is 500ms and exists
for calls on a clock - the tray's scan timer, where waiting the full timeout
would let callbacks outlast their own period. Discarding is not one of those: it
comes from the menu or a hot key, and it no longer runs on the UI thread.

Meanwhile the owner answering it may be inside InlineApplier, which waits up to
ten seconds on its cross process mutex. So half a second turned a busy owner
into "The snapshot viewer is not running." for a single discard.

DiscardAll was worse, because its result was dropped. Tracker.Clear emptied its
own snapshot list regardless, so "Discard (n)" reported success while the owner
had never received the message - and everything reappeared on the next scan two
seconds later. It now returns the outcome, and Clear only forgets what it holds
when the owner confirms.

Both wait on acceptWait, the same fifteen seconds an accept gets, for the same
reason.

Discard and DiscardAll used ViewerClient.ShortTimeout, which is 500ms and exists
for calls on a clock - the tray's scan timer, where waiting the full timeout
would let callbacks outlast their own period. Discarding is not one of those: it
comes from the menu or a hot key, and it no longer runs on the UI thread.

Meanwhile the owner answering it may be inside InlineApplier, which waits up to
ten seconds on its cross process mutex. So half a second turned a busy owner
into "The snapshot viewer is not running." for a single discard.

DiscardAll was worse, because its result was dropped. Tracker.Clear emptied its
own snapshot list regardless, so "Discard (n)" reported success while the owner
had never received the message - and everything reappeared on the next scan two
seconds later. It now returns the outcome, and Clear only forgets what it holds
when the owner confirms.

Both wait on acceptWait, the same fifteen seconds an accept gets, for the same
reason.
@SimonCropp SimonCropp added this to the 20.0.0 milestone Aug 22, 2026
@SimonCropp
SimonCropp merged commit 2e20d9d into main Aug 22, 2026
9 checks passed
@SimonCropp
SimonCropp deleted the fix-discard-short-timeout branch August 22, 2026 07:16
This was referenced Aug 26, 2026
This was referenced Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant