jonhoo / jonhoo/rust-imap

Fail more gracefully if we fail to decode server replies

Open
#71 2 comments 1 reaction 0 assignees View on GitHub
bug help wanted tombstone
Dominant language
Rust
Stars
583
Forks
94
PR merge metrics
No merged PRs in 30d

Description

Currently, [this line](https://github.com/mattnenterprise/rust-imap/blob/c28d08851c3b1472b7cb37589171c9648b57ca46/src/client.rs#L526) will always trigger, which causes us to send a logout to the server. Which is probably fine. But then we try to read the response to the `LOGOUT`, where we fail because we didn't finish parsing the response that caused us to terminate the connection in the first place. In particular, we often then hit a reply with the tag of the previous reply, which violates the assertion [here](https://github.com/mattnenterprise/rust-imap/blob/c28d08851c3b1472b7cb37589171c9648b57ca46/src/client.rs#L512). That logic should be cleaned up so we fail in a more helpful way.

See the original issue here: https://github.com/mattnenterprise/rust-imap/issues/71

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.