mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: proper #[cfg] attrs for windows/unix (#2807)
This commit is contained in:
@ -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);
|
||||
@ -159,7 +160,10 @@ where
|
||||
},
|
||||
res = fut => res?,
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
#[cfg(not(unix))]
|
||||
{
|
||||
pin_mut!(ctrl_c, fut);
|
||||
|
||||
tokio::select! {
|
||||
|
||||
Reference in New Issue
Block a user