mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
fix: update ClientConfig settings for improved connection management
This commit is contained in:
@@ -2,7 +2,6 @@ use std::time::Duration;
|
|||||||
|
|
||||||
use kode_bridge::{
|
use kode_bridge::{
|
||||||
errors::{AnyError, AnyResult},
|
errors::{AnyError, AnyResult},
|
||||||
pool::PoolConfig,
|
|
||||||
ClientConfig, IpcHttpClient, LegacyResponse,
|
ClientConfig, IpcHttpClient, LegacyResponse,
|
||||||
};
|
};
|
||||||
use percent_encoding::{utf8_percent_encode, AsciiSet, CONTROLS};
|
use percent_encoding::{utf8_percent_encode, AsciiSet, CONTROLS};
|
||||||
@@ -42,19 +41,11 @@ impl IpcManager {
|
|||||||
let ipc_path = ipc_path_buf.to_str().unwrap_or_default();
|
let ipc_path = ipc_path_buf.to_str().unwrap_or_default();
|
||||||
let config = ClientConfig {
|
let config = ClientConfig {
|
||||||
default_timeout: Duration::from_secs(5),
|
default_timeout: Duration::from_secs(5),
|
||||||
enable_pooling: true,
|
enable_pooling: false,
|
||||||
max_retries: 3,
|
max_retries: 4,
|
||||||
max_concurrent_requests: 64,
|
retry_delay: Duration::from_millis(125),
|
||||||
max_requests_per_second: Some(10.0),
|
max_concurrent_requests: 16,
|
||||||
pool_config: PoolConfig {
|
max_requests_per_second: Some(64.0),
|
||||||
max_size: 64,
|
|
||||||
min_idle: 8,
|
|
||||||
max_idle_time_ms: 60_000,
|
|
||||||
max_retries: 3,
|
|
||||||
max_concurrent_requests: 64,
|
|
||||||
max_requests_per_second: Some(10.0),
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
Self {
|
Self {
|
||||||
|
|||||||
Reference in New Issue
Block a user