Skip to content

fix(mobile): retry legacy upload after transport reset - #5431

Open
kendraferguson14 wants to merge 1 commit into
block:mainfrom
kendraferguson14:fix/mobile-upload-reset-fallback
Open

fix(mobile): retry legacy upload after transport reset#5431
kendraferguson14 wants to merge 1 commit into
block:mainfrom
kendraferguson14:fix/mobile-upload-reset-fallback

Conversation

@kendraferguson14

Copy link
Copy Markdown

Summary

  • retry the legacy media upload alias when the standard upload route fails with a ClientException or SocketException
  • preserve user cancellation before attempting the compatibility retry
  • cover the observed connection-reset regression with a focused mobile test

Older self-hosted relays can reject the standard upload route before consuming the streamed request body. Dart then surfaces the half-closed request as “Connection reset by peer” instead of exposing the HTTP 404/405 that triggers the existing fallback. Blossom uploads are content-addressed and idempotent, so retrying the legacy alias is safe even if the first response was lost after storage.

Related issue

No exact duplicate found. The closest upload reliability work is #3766, which covers cancellation rather than early-response transport resets.

Testing

  • flutter test test/shared/relay/media_upload_test.dart — 36 passed
  • flutter analyze lib/shared/relay/media_upload.dart test/shared/relay/media_upload_test.dart — no issues
  • reproduced against a self-hosted relay that returned 405 on the standard upload route; the mobile-visible failure was ClientException with SocketConnection reset by peer

Signed-off-by: Kendra Agents Bot <298386085+kendra-agents-bot@users.noreply.github.com>
@kendraferguson14
kendraferguson14 requested a review from a team as a code owner August 9, 2026 21:31
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.

2 participants