Skip to content

Commit

Permalink
fix: proper #[cfg] attrs for windows/unix (#2807)
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg committed May 24, 2023
1 parent 1e53d5f commit 69e792e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bin/reth/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ where
{
let ctrl_c = tokio::signal::ctrl_c();

if cfg!(unix) {
#[cfg(unix)]
{
let mut stream = tokio::signal::unix::signal(tokio::signal::unix::SignalKind::terminate())?;
let sigterm = stream.recv();
pin_mut!(sigterm, ctrl_c, fut);
Expand All @@ -159,7 +160,10 @@ where
},
res = fut => res?,
}
} else {
}

#[cfg(not(unix))]
{
pin_mut!(ctrl_c, fut);

tokio::select! {
Expand Down

0 comments on commit 69e792e

Please sign in to comment.