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

v2: MOVE: unexpected EOF

Open RichardFevrier opened this issue 11 months ago • 2 comments

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"

RichardFevrier avatar Jan 17 '25 15:01 RichardFevrier

How do you collect logs? Are you using DebugWriter?

emersion avatar Jan 17 '25 17:01 emersion

Yes

&imapclient.Options{DebugWriter: os.Stdout}

Also it seems only to happen when moving to [Gmail]/Trash.

RichardFevrier avatar Jan 17 '25 18:01 RichardFevrier