mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
simplify return value of flush_status_updates() (#3597)
this was probably forgotten by recent refactorings in this area.
This commit is contained in:
@@ -414,15 +414,12 @@ impl Context {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Attempts to send queued webxdc status updates.
|
/// Attempts to send queued webxdc status updates.
|
||||||
///
|
pub(crate) async fn flush_status_updates(&self) -> Result<()> {
|
||||||
/// Returns true if there are more status updates to send, but rate limiter does not
|
|
||||||
/// allow to send them. Returns false if there are no more status updates to send.
|
|
||||||
pub(crate) async fn flush_status_updates(&self) -> Result<bool> {
|
|
||||||
loop {
|
loop {
|
||||||
let (instance_id, first_serial, last_serial, descr) =
|
let (instance_id, first_serial, last_serial, descr) =
|
||||||
match self.pop_smtp_status_update().await? {
|
match self.pop_smtp_status_update().await? {
|
||||||
Some(res) => res,
|
Some(res) => res,
|
||||||
None => return Ok(false),
|
None => return Ok(()),
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(json) = self
|
if let Some(json) = self
|
||||||
|
|||||||
Reference in New Issue
Block a user