Skip to content

BUG: Inconsistent timeout values across daemon handlers #985

@andrinoff

Description

@andrinoff

Describe the bug

daemon/handler.go uses inconsistent timeout values:

  • Lines 120, 145, 309: 60 seconds for FetchEmails, FetchEmailBody, MarkAsRead(batch)
  • Lines 184, 207, 230, 253, 278: 30 seconds for Delete, Archive, Move, FetchFolders

There's no documented reason for the difference. Some operations that should have longer timeouts (delete many emails) get 30s while simpler ones (mark as read) get 60s.

To reproduce

N/A — inconsistency issue.

Expected behavior

Define named constants for operation-type timeouts and document the rationale:

const (
    fetchTimeout = 60 * time.Second
    mutateTimeout = 30 * time.Second
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions