summaryrefslogtreecommitdiffstats
path: root/src/service.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/service.rs')
-rw-r--r--src/service.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/service.rs b/src/service.rs
index c45fcb1..8e0863c 100644
--- a/src/service.rs
+++ b/src/service.rs
@@ -6,7 +6,7 @@ use serde::Deserialize;
use systemd::Systemd;
use tcp::Tcp;
use tokio::{
- sync::watch::{Receiver, Sender},
+ sync::watch::{channel, Receiver, Sender},
task::JoinHandle,
};
use tokio_stream::wrappers::WatchStream;
@@ -34,7 +34,7 @@ pub struct ServiceHandle {
impl ServiceHandle {
pub fn new(service: impl ServiceSpawner) -> Self {
- let (tx, rx) = tokio::sync::watch::channel(Status::default());
+ let (tx, rx) = channel(Status::Error(None));
let handle = tokio::spawn(service.spawn(tx));
Self { handle, rx }
}