fix: possible hang when p2pool restart
Some checks are pending
CI / ci (macos-latest) (push) Waiting to run
CI / ci (ubuntu-latest) (push) Waiting to run
Rust / fmt (push) Waiting to run
Rust / test (macos-latest) (push) Waiting to run
Rust / test (ubuntu-latest) (push) Waiting to run
Rust / typo (push) Waiting to run
Rust / clippy (macos-latest) (push) Waiting to run
Rust / clippy (ubuntu-latest) (push) Waiting to run
Rust / check (macos-latest) (push) Waiting to run
Rust / check (ubuntu-latest) (push) Waiting to run
Rust / doc (macos-latest) (push) Waiting to run
Rust / doc (ubuntu-latest) (push) Waiting to run
Typo / typo (push) Waiting to run

This commit is contained in:
Cyrix126 2024-07-24 11:21:11 +02:00
parent a401c5202a
commit 5b322cedfb

View file

@ -163,7 +163,7 @@ impl Helper {
let path = path.to_path_buf();
// This thread lives to wait, start p2pool then die.
thread::spawn(move || {
while lock2!(helper, p2pool).is_alive() {
while lock2!(helper, p2pool).state != ProcessState::Waiting {
warn!("P2Pool | Want to restart but process is still alive, waiting...");
sleep!(1000);
}