matcha
matcha copied to clipboard
BUG: Missing context cancellation in provider operations
Describe the bug daemonclient/service.go lines 246-299 use context.Background() for all provider operations, preventing timeout/cancellation from upper layers.
To reproduce Examine daemonclient/service.go:
func (p *providerWrapper) FetchEmails(ctx context.Context, folder string, limit, offset uint32) ([]backend.Email, error) {
// ...
return p.FetchEmails(context.Background(), folder, limit, offset) // Ignores ctx!
}
Lines 246, 254, 262, 270, 278, 287, 299 all use context.Background() instead of passed ctx parameter.
Expected behavior Use passed context parameter to respect cancellation/timeouts.
Additional context
- Good first issue
- Defeats purpose of passing context
- Long operations can't be cancelled
- daemon/handler.go sets timeouts but service.go ignores them
Suggested fix:
return p.FetchEmails(ctx, folder, limit, offset) // Use ctx, not Background()
OS All platforms
This has had no activity for 30 days. It will be closed in 14 days unless updated. Comment or remove the stale label to keep it open.
Closing due to inactivity. Reopen if still relevant.