go-imap icon indicating copy to clipboard operation
go-imap copied to clipboard

Update dispatching is broken and racy

Open emersion opened this issue 4 years ago • 3 comments

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.

emersion avatar Jul 08 '20 08:07 emersion

Issue is no longer relevant since #374 is a thing?

foxcpp avatar Aug 03 '20 17:08 foxcpp

go-imap v2 is not released yet, let's wait before closing this.

emersion avatar Aug 05 '20 15:08 emersion

Yeah, just making a note that there is no need to spend a lot of effort fixing troubles with v1 code.

foxcpp avatar Aug 05 '20 17:08 foxcpp