Open
Conversation
adamvy
commented
Apr 22, 2026
| }) | ||
| } | ||
|
|
||
| resetChan := cli.RequestRetryTrigger.GetChan() |
Contributor
Author
There was a problem hiding this comment.
I suppose I could just do RequestRetryTrigger.Wait(attemptCtx) in the goroutine?
adamvy
commented
Apr 22, 2026
|
|
||
| RequestRetryTrigger *exsync.Event | ||
|
|
||
| // Deprecated: this hook is no longer used by mautrix internals and is kept only |
Contributor
Author
There was a problem hiding this comment.
I suppose we could just delete this and consumers can either upgrade to the new behaviour, or just drop the functionality entirely.
Is anyone outside beeper using this atm?
tulir
reviewed
Apr 22, 2026
Co-authored-by: Tulir Asokan <[email protected]>
Co-authored-by: Tulir Asokan <[email protected]>
Contributor
Author
|
I suppose an alternative would be to just do this all at the sdk layer and not involve mautrix at all? LIke a whole other retry wrapper in sdk, unsure how I feel about that yet. |
tulir
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a simple trigger using exsync.Event to abort and retry network requests.
Before this logic was somewhat split between beeper internal code and mautrix/go. This resulting a lot of redundant book-keeping on the beeper side to interact nicely with mautrix.
New logic here moves the per-request context creation into mautrix directly hooked into the retry logic. The new logic only applies if a RequestRetryTrigger is provided.
Also included are a bunch of ai generated tests, but happy to remove or simplify them if you want.
Beeper side of this is https://github.com/beeper/beeper/pull/2466