[model-gateway] Avoid MCP Server Initialization Issue (#15065)
This commit is contained in:
@@ -660,9 +660,8 @@ impl McpManager {
|
|||||||
|
|
||||||
// Create HTTP client with proxy support
|
// Create HTTP client with proxy support
|
||||||
let client = if token.is_some() {
|
let client = if token.is_some() {
|
||||||
let mut builder = reqwest::Client::builder()
|
let mut builder =
|
||||||
.timeout(Duration::from_secs(30))
|
reqwest::Client::builder().connect_timeout(Duration::from_secs(10));
|
||||||
.connect_timeout(Duration::from_secs(10));
|
|
||||||
|
|
||||||
// Apply proxy configuration using proxy.rs helper
|
// Apply proxy configuration using proxy.rs helper
|
||||||
if let Some(proxy_cfg) = proxy_config {
|
if let Some(proxy_cfg) = proxy_config {
|
||||||
|
|||||||
@@ -95,9 +95,7 @@ pub fn apply_proxy_to_builder(
|
|||||||
/// # Returns
|
/// # Returns
|
||||||
/// A configured reqwest::Client or error
|
/// A configured reqwest::Client or error
|
||||||
pub fn create_http_client(proxy_config: Option<&McpProxyConfig>) -> McpResult<reqwest::Client> {
|
pub fn create_http_client(proxy_config: Option<&McpProxyConfig>) -> McpResult<reqwest::Client> {
|
||||||
let mut builder = reqwest::Client::builder()
|
let mut builder = reqwest::Client::builder().connect_timeout(Duration::from_secs(10));
|
||||||
.timeout(Duration::from_secs(30))
|
|
||||||
.connect_timeout(Duration::from_secs(10));
|
|
||||||
|
|
||||||
// Apply MCP-specific proxy if configured
|
// Apply MCP-specific proxy if configured
|
||||||
if let Some(proxy_cfg) = proxy_config {
|
if let Some(proxy_cfg) = proxy_config {
|
||||||
|
|||||||
Reference in New Issue
Block a user