Skip to content

Commit a4c9fe2

Browse files
committed
More fix Windows builds
1 parent 6579fad commit a4c9fe2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/app.rs

+6
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ impl ApplicationConfig {
156156
}
157157

158158
impl Application {
159+
#[must_use]
159160
pub fn run() -> ExitStatus {
160161
let (runtime, app) = Self::prepare_start().unwrap_or_else(|code| std::process::exit(code));
161162

@@ -254,10 +255,12 @@ pub struct StartedApplication {
254255
}
255256

256257
impl StartedApplication {
258+
#[must_use]
257259
pub async fn run(self) -> ExitStatus {
258260
self.main().await.shutdown().await
259261
}
260262

263+
#[must_use]
261264
pub async fn main(self) -> FinishedApplication {
262265
let Self {
263266
config_paths,
@@ -353,6 +356,7 @@ pub struct FinishedApplication {
353356
}
354357

355358
impl FinishedApplication {
359+
#[must_use]
356360
pub async fn shutdown(self) -> ExitStatus {
357361
let FinishedApplication {
358362
signal,
@@ -374,6 +378,7 @@ impl FinishedApplication {
374378
}
375379
}
376380

381+
#[must_use]
377382
async fn stop(topology_controller: TopologyController, mut signal_rx: SignalRx) -> ExitStatus {
378383
emit!(VectorStopped);
379384
tokio::select! {
@@ -389,6 +394,7 @@ impl FinishedApplication {
389394
}
390395
}
391396

397+
#[must_use]
392398
fn quit() -> ExitStatus {
393399
// It is highly unlikely that this event will exit from topology.
394400
emit!(VectorQuit);

src/vector_windows.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ fn run_service(_arguments: Vec<OsString>) -> Result<()> {
379379

380380
// Handle stop
381381
ServiceControl::Stop => {
382-
while signal_tx.send(SignalTo::Shutdown).is_err() {}
382+
while signal_tx.send(SignalTo::Shutdown(None)).is_err() {}
383383
ServiceControlHandlerResult::NoError
384384
}
385385

0 commit comments

Comments
 (0)