Skip to content

Commit

Permalink
fix: don't register the signal handler while unit testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nyannyacha committed Jan 10, 2024
1 parent 555cf5a commit aab5fd4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/base/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,10 @@ impl Server {
)
.await?;

// register alarm signal handler
cpu_timer::register_alarm()?;
if !cfg!(test) {
// register alarm signal handler
cpu_timer::register_alarm()?;
}

let ip = Ipv4Addr::from_str(ip)?;
Ok(Self {
Expand Down

0 comments on commit aab5fd4

Please sign in to comment.