WIP fix the occasional stuck RPC request
(cherry picked from commit 5cf9094bb9
)
This commit is contained in:
committed by
Michael Vines
parent
2e31f4d8f7
commit
008e387381
@ -357,6 +357,14 @@ impl JsonRpcService {
|
|||||||
|
|
||||||
let ledger_path = ledger_path.to_path_buf();
|
let ledger_path = ledger_path.to_path_buf();
|
||||||
|
|
||||||
|
let runtime01 = {
|
||||||
|
use tokio_01::runtime::{Builder as RuntimeBuilder, Runtime, TaskExecutor};
|
||||||
|
RuntimeBuilder::new()
|
||||||
|
.name_prefix("rpc")
|
||||||
|
.build()
|
||||||
|
.unwrap()
|
||||||
|
};
|
||||||
|
|
||||||
let (close_handle_sender, close_handle_receiver) = channel();
|
let (close_handle_sender, close_handle_receiver) = channel();
|
||||||
let thread_hdl = Builder::new()
|
let thread_hdl = Builder::new()
|
||||||
.name("solana-jsonrpc".to_string())
|
.name("solana-jsonrpc".to_string())
|
||||||
@ -375,7 +383,8 @@ impl JsonRpcService {
|
|||||||
io,
|
io,
|
||||||
move |_req: &hyper::Request<hyper::Body>| request_processor.clone(),
|
move |_req: &hyper::Request<hyper::Body>| request_processor.clone(),
|
||||||
)
|
)
|
||||||
.threads(rpc_threads)
|
.event_loop_executor(runtime01.executor())
|
||||||
|
.threads(1)
|
||||||
.cors(DomainsValidation::AllowOnly(vec![
|
.cors(DomainsValidation::AllowOnly(vec![
|
||||||
AccessControlAllowOrigin::Any,
|
AccessControlAllowOrigin::Any,
|
||||||
]))
|
]))
|
||||||
|
Reference in New Issue
Block a user