Skip to content

Commit d09afbc

Browse files
committed
Increase number of simultaneous connections for proxying to 2000 (was 100)
1 parent 855d3cf commit d09afbc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

casper-server/src/main.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::sync::Arc;
33
use std::time::Duration;
44

55
use clap::Parser;
6-
use ntex::http::client::Client as HttpClient;
6+
use ntex::http::client::{Client as HttpClient, Connector as HttpConnector};
77
use ntex::http::HttpService;
88
use ntex::io::Io;
99
use ntex::rt::System;
@@ -86,7 +86,9 @@ async fn main_inner(args: Args) -> anyhow::Result<()> {
8686
let id = context.id;
8787

8888
// Construct default HTTP client and attach it to Lua
89+
let connector = HttpConnector::new().limit(2000);
8990
let http_client = HttpClient::build()
91+
.connector(connector.finish())
9092
.disable_redirects()
9193
.disable_timeout()
9294
.finish();

0 commit comments

Comments
 (0)