diff options
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index ed9c8a7..6e8b82d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ use tokio::sync::Mutex; -use std::{process::exit, sync::Arc, path::PathBuf, str::FromStr}; +use std::{sync::Arc, path::PathBuf, str::FromStr}; use matrix_sdk::{ config::SyncSettings, ruma::{events::room::message::RoomMessageEventContent, OwnedRoomOrAliasId}, Client, Room, encryption::EncryptionSettings, }; @@ -152,8 +152,9 @@ async fn read_ntfy(config: &Options, rooms_to_notify: Arc<Mutex<Vec<Room>>>) -> }; if !req.status().is_success() { - tracing::error!("fatal: ntfy sent status {}", req.status()); - exit(1); + tracing::error!("ntfy sent status {}, will retry ..", req.status()); + tokio::time::sleep(tokio::time::Duration::from_millis(5000)).await; + return Ok(()); } let stream = req |