Skip to content

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

Open
@wms15391

Description

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()"
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions