mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2024-11-24 04:12:34 +08:00
This commit is contained in:
parent
70242e6eb2
commit
324dfd6a1f
@ -156,8 +156,6 @@ pub async fn listen_signal() -> Result<()> {
|
|||||||
use hbb_common::tokio::signal::unix::{signal, SignalKind};
|
use hbb_common::tokio::signal::unix::{signal, SignalKind};
|
||||||
|
|
||||||
tokio::spawn(async {
|
tokio::spawn(async {
|
||||||
let mut s = signal(SignalKind::hangup())?;
|
|
||||||
let hangup = s.recv();
|
|
||||||
let mut s = signal(SignalKind::terminate())?;
|
let mut s = signal(SignalKind::terminate())?;
|
||||||
let terminate = s.recv();
|
let terminate = s.recv();
|
||||||
let mut s = signal(SignalKind::interrupt())?;
|
let mut s = signal(SignalKind::interrupt())?;
|
||||||
@ -166,9 +164,6 @@ pub async fn listen_signal() -> Result<()> {
|
|||||||
let quit = s.recv();
|
let quit = s.recv();
|
||||||
|
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
_ = hangup => {
|
|
||||||
log::info!("signal hangup");
|
|
||||||
}
|
|
||||||
_ = terminate => {
|
_ = terminate => {
|
||||||
log::info!("signal terminate");
|
log::info!("signal terminate");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user