mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 20:57:59 +00:00
core: allow setting max ws rpc connections (#2632)
* core: allow setting max ws rpc connections * style: break long lines * core: fix service tests
This commit is contained in:
@@ -487,6 +487,7 @@ where
|
||||
config.rpc_ws = Some(
|
||||
parse_address(&format!("{}:{}", ws_interface, 9944), cli.ws_port)?
|
||||
);
|
||||
config.rpc_ws_max_connections = cli.ws_max_connections;
|
||||
config.rpc_cors = cli.rpc_cors.unwrap_or_else(|| if is_dev {
|
||||
log::warn!("Running in --dev mode, RPC CORS has been disabled.");
|
||||
None
|
||||
|
||||
@@ -333,6 +333,10 @@ pub struct RunCmd {
|
||||
#[structopt(long = "ws-port", value_name = "PORT")]
|
||||
pub ws_port: Option<u16>,
|
||||
|
||||
/// Maximum number of WS RPC server connections.
|
||||
#[structopt(long = "ws-max-connections", value_name = "COUNT")]
|
||||
pub ws_max_connections: Option<usize>,
|
||||
|
||||
/// Specify browser Origins allowed to access the HTTP & WS RPC servers.
|
||||
/// It's a comma-separated list of origins (protocol://domain or special `null` value).
|
||||
/// Value of `all` will disable origin validation.
|
||||
|
||||
Reference in New Issue
Block a user