go-imap
go-imap copied to clipboard
Update dispatching is broken and racy
Broken
The way channels are used makes it so updates are only sent to the first client. See https://github.com/emersion/go-imap/pull/336
Racy
We read from the connection context:
https://github.com/emersion/go-imap/blob/3bc38e360e3c75d52e3e2c60f3597369154ec4b4/server/server.go#L331
However there's an assumption that only the connection's goroutine will access it.
Issue is no longer relevant since #374 is a thing?
go-imap v2 is not released yet, let's wait before closing this.
Yeah, just making a note that there is no need to spend a lot of effort fixing troubles with v1 code.