fix: IDLE not waking on new messages, add --debug flag #8
No reviewers
Labels
No labels
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
dep-scan/ignore
finding
mod-nag
mod-nag
mod-nag
mod-nag
mod-nag/ignore
mod-nag/ignore
mod-nag/ignore
mod-nag/ignore
bug
doc
duplicate
enhancement
help wanted
invalid
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
IUS/xr-invoiced!8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/idle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
--debug=imapflag for IMAP wire protocol dump (stderr)--debug=scanflag for scan lifecycle logging (search results, IDLE wake events, reconnect attempts)Root cause
The go-imap v2
IdleCommand.Wait()only returns whenClose()is called. EXISTS notifications fire throughUnilateralDataHandler.Mailbox, but no handler was registered — notifications were silently discarded. The IDLE loop only checked for new messages every 28 minutes (timeout).Test plan
go test ./...passesgolangci-lint runclean--debug=imap,scan, deliver a message, verify IDLE breaks and message is processed immediately32f26ebc75to4c1067c764Tests pass for this branch with:
CGO_ENABLED=0 GOCACHE=/tmp/go-build-pr8 go test ./...
One small thing I’d tighten before merge: --debug silently ignores unknown values. For example, --debug=imapx currently behaves like debug is disabled. It would be better to fail fast with a clear error for unsupported debug channels, while accepting the current imap and scan values.
4c1067c764tocb40e1fbecPull request closed