aboutsummaryrefslogtreecommitdiff
path: root/src/imap/session.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-07-13 15:26:00 +0200
committerAlex Auvolat <alex@adnab.me>2022-07-13 15:26:00 +0200
commitc703e3e2b813cf74fc2d3d87b045dcc9fb93d190 (patch)
treee7aa3a1ca2922207bad4275c4a2afb111bf2f13a /src/imap/session.rs
parent15a354f9499c82dff69db71d92097bec51ee54bf (diff)
downloadaerogramme-c703e3e2b813cf74fc2d3d87b045dcc9fb93d190.tar.gz
aerogramme-c703e3e2b813cf74fc2d3d87b045dcc9fb93d190.zip
Fix list wildcards
Diffstat (limited to 'src/imap/session.rs')
-rw-r--r--src/imap/session.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/imap/session.rs b/src/imap/session.rs
index 622a3f6..15141d3 100644
--- a/src/imap/session.rs
+++ b/src/imap/session.rs
@@ -140,7 +140,13 @@ impl Instance {
let res = match ctrl {
Ok((res, tr)) => {
//@FIXME remove unwrap
- self.state = self.state.apply(tr).unwrap();
+ self.state = match self.state.apply(tr) {
+ Ok(new_state) => new_state,
+ Err(e) => {
+ tracing::error!("Invalid transition: {}, exiting", e);
+ break;
+ }
+ };
//@FIXME enrich here the command with some global status