diff options
author | Alex Auvolat <alex@adnab.me> | 2022-07-13 15:26:00 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-07-13 15:26:00 +0200 |
commit | c703e3e2b813cf74fc2d3d87b045dcc9fb93d190 (patch) | |
tree | e7aa3a1ca2922207bad4275c4a2afb111bf2f13a /src/imap/session.rs | |
parent | 15a354f9499c82dff69db71d92097bec51ee54bf (diff) | |
download | aerogramme-c703e3e2b813cf74fc2d3d87b045dcc9fb93d190.tar.gz aerogramme-c703e3e2b813cf74fc2d3d87b045dcc9fb93d190.zip |
Fix list wildcards
Diffstat (limited to 'src/imap/session.rs')
-rw-r--r-- | src/imap/session.rs | 8 |
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 |