diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-17 16:56:05 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-17 16:56:05 +0100 |
commit | e1161cab0e71ec604e376d2d87f7d1226f3f0244 (patch) | |
tree | 54cc16089536d3451bb1602b5830844e9bb9c4cb /src/imap/session.rs | |
parent | 4a15ceacf1f45b15ae9b926110f48447c258ba1c (diff) | |
download | aerogramme-e1161cab0e71ec604e376d2d87f7d1226f3f0244.tar.gz aerogramme-e1161cab0e71ec604e376d2d87f7d1226f3f0244.zip |
idle sync
Diffstat (limited to 'src/imap/session.rs')
-rw-r--r-- | src/imap/session.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/imap/session.rs b/src/imap/session.rs index d15016f..1d473ed 100644 --- a/src/imap/session.rs +++ b/src/imap/session.rs @@ -38,6 +38,16 @@ impl Instance { _ => unreachable!(), }; + tokio::select! { + _ = stop.notified() => { + return Response::build() + .tag(imap_codec::imap_types::core::Tag::try_from("FIXME").unwrap()) + .message("IDLE completed") + .ok() + .unwrap() + } + } + unimplemented!(); } @@ -108,8 +118,8 @@ impl Instance { .unwrap()); } - match self.state { - flow::State::Idle(..) => ResponseOrIdle::StartIdle, + match &self.state { + flow::State::Idle(_, _, _, n) => ResponseOrIdle::StartIdle(n.clone()), _ => ResponseOrIdle::Response(resp), } } |