go-imap
go-imap copied to clipboard
v2: MOVE: unexpected EOF
Performing a move&wait on Gmail results with an unexpected EOF error, but still performs the move and think that the the connection is closed so I am unable to do multiple ones.
Here is some code:
var collected []*imapclient.FetchMessageBuffer
...
for _, message := range collected {
cmd, err := client.Move(imap.UIDSetNum(message.UID), mailbox_destination).Wait()
log.Println(cmd) // nil
log.Println(err) // "unexpected EOF" on 1st iteration then "use of closed network connection"
}
The only log that I get during the move is that so I guess the connection is not really closed:
T7 UID MOVE 54418 "[Gmail]/Trash"
How do you collect logs? Are you using DebugWriter?
Yes
&imapclient.Options{DebugWriter: os.Stdout}
Also it seems only to happen when moving to [Gmail]/Trash.