Skip to content

Let Dot attachment downloads use the full download timeout - #41

Merged
Fizzadar merged 1 commit into
mainfrom
indent/chatgpt-dots-attachment-download-timeout
Nov 5, 2026
Merged

Fizzadar merged 1 commit into
mainfrom
indent/chatgpt-dots-attachment-download-timeout

Conversation

@indent

@indent indent Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Production logs show one account stuck retrying one ChatGPT attachment. Each of its five real attempts ended with "attachment download interrupted" after about 32 s and logged "Event handling is taking long" for that room. In between, the media retry schedule kept the attachment pending and backed off toward 15 minutes. The file never arrived. Later messages in the room were still delivered.

Cause: incomingFile gives the download a 2-minute context, but DownloadAttachment fetches the storage URL with the shared API client, whose http.Client.Timeout is 30 s. That timeout also covers reading the body, so io.ReadAll fails at 30 s and returns an AttachmentStorageError. Any file that needs more than 30 s to fetch fails the same way on every retry, forever.

Change: the storage GET uses a copy of the client with Timeout set to 0, so the caller's 2-minute context sets the limit. Metadata and other API calls keep the 30 s timeout. go build ./... and go vet pass.

View in Indent
Tag @indent to continue the conversation here.

@indent

indent Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Issues

No issues found.

CI Checks

All CI checks passed on 43113fe.

Review agents

Select any unchecked box below to run or rerun that agent.

Passed (1)
  • Indent Review Agent · No issues found in the timeout change.
Full results

Indent Review Agent

  • Summary: No issues found in the timeout change.
  • Last ran on commit: 43113fe2
  • Latest result
    {
      "summary": "No issues found in the timeout change.",
      "findings": []
    }

@indent indent Bot added the to be tested label Nov 5, 2026
@Fizzadar
Fizzadar merged commit fd9fff0 into main Nov 5, 2026
7 checks passed
@Fizzadar
Fizzadar deleted the indent/chatgpt-dots-attachment-download-timeout branch November 5, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants