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:
Illia Bobyr 2023-06-01 11:20:59 -07:00 committed by GitHub
parent 1302962521
commit e0389ba90f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -581,7 +581,6 @@ impl Validator {
)); ));
} }
let exit = Arc::new(AtomicBool::new(false));
{ {
let exit = exit.clone(); let exit = exit.clone();
config config

View File

@ -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;
} }
}) })