Skip to content

[v2] fetchCmd.Close() never finish if timeout #650

Closed
@wms15391

Description

@wms15391

change literalReadTimeout = 2 * time.Second to test,and read a message with attachments
......

fetchOptions := &imap.FetchOptions{BodySection: []*imap.FetchItemBodySection{{}}}
fetchCmd := c.Fetch(seqSet, fetchOptions)
defer fetchCmd.Close()
......
b, err := io.ReadAll(p.Body)
if err != nil {
    log(err) //got log: read tcp 192.168.10.21:62984->xxx.xxx.xxx.xxx:993: i/o timeout
    return  err //no return,unless delete "defer fetchCmd.Close()"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions