go-imap
go-imap copied to clipboard
v2: fix #310: Possible MailboxStatus race condition
Hey! I tried to follow @emersion's advice and addressed #310 by copying the internal MailboxStatus
before returning its pointer.
This change can introduce breaking behavior (e.g. a library user was modifying MailboxStatus
instance returned from Mailbox()
) but that behavior shouldn't be allowed in the first place.