Revert "move rpc_server to drop() semantics instead of having its own thread"
This reverts commit 40aa0654fa
.
This commit is contained in:
@ -24,7 +24,6 @@ use window;
|
||||
pub struct Fullnode {
|
||||
exit: Arc<AtomicBool>,
|
||||
thread_hdls: Vec<JoinHandle<()>>,
|
||||
_rpc_service: JsonRpcService,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
|
||||
@ -191,8 +190,14 @@ impl Fullnode {
|
||||
let mut drone_addr = node.info.contact_info.tpu;
|
||||
drone_addr.set_port(DRONE_PORT);
|
||||
let rpc_addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::from(0)), RPC_PORT);
|
||||
let _rpc_service =
|
||||
JsonRpcService::new(&bank, node.info.contact_info.tpu, drone_addr, rpc_addr);
|
||||
let rpc_service = JsonRpcService::new(
|
||||
&bank,
|
||||
node.info.contact_info.tpu,
|
||||
drone_addr,
|
||||
rpc_addr,
|
||||
exit.clone(),
|
||||
);
|
||||
thread_hdls.extend(rpc_service.thread_hdls());
|
||||
|
||||
let blob_recycler = BlobRecycler::default();
|
||||
let window =
|
||||
@ -261,11 +266,7 @@ impl Fullnode {
|
||||
}
|
||||
}
|
||||
|
||||
Fullnode {
|
||||
exit,
|
||||
thread_hdls,
|
||||
_rpc_service,
|
||||
}
|
||||
Fullnode { exit, thread_hdls }
|
||||
}
|
||||
|
||||
//used for notifying many nodes in parallel to exit
|
||||
|
Reference in New Issue
Block a user