GeyserPluginService: Use common `exit` flag. (#31915)
Geyser plugin thread would never shutdown correctly, as it is using an exit flag that is never set.
This commit is contained in:
parent
1302962521
commit
e0389ba90f
|
@ -581,7 +581,6 @@ impl Validator {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
let exit = Arc::new(AtomicBool::new(false));
|
|
||||||
{
|
{
|
||||||
let exit = exit.clone();
|
let exit = exit.clone();
|
||||||
config
|
config
|
||||||
|
|
|
@ -19,7 +19,10 @@ use {
|
||||||
solana_runtime::accounts_update_notifier_interface::AccountsUpdateNotifier,
|
solana_runtime::accounts_update_notifier_interface::AccountsUpdateNotifier,
|
||||||
std::{
|
std::{
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
sync::{atomic::AtomicBool, Arc, RwLock},
|
sync::{
|
||||||
|
atomic::{AtomicBool, Ordering},
|
||||||
|
Arc, RwLock,
|
||||||
|
},
|
||||||
thread,
|
thread,
|
||||||
time::Duration,
|
time::Duration,
|
||||||
},
|
},
|
||||||
|
@ -231,7 +234,7 @@ impl GeyserPluginService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if exit.load(std::sync::atomic::Ordering::Relaxed) {
|
if exit.load(Ordering::Relaxed) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue