From e1161cab0e71ec604e376d2d87f7d1226f3f0244 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 17 Jan 2024 16:56:05 +0100 Subject: idle sync --- src/imap/session.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/imap/session.rs') 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), } } -- cgit v1.2.3