mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2025-12-19 23:04:25 +01:00
Use total_seconds instead of seconds on timeout (#896)
This commit is contained in:
committed by
GitHub
parent
7123556a34
commit
b0b44c2fe4
@@ -195,7 +195,8 @@ class StreamableHTTPTransport:
|
|||||||
self.url,
|
self.url,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
timeout=httpx.Timeout(
|
timeout=httpx.Timeout(
|
||||||
self.timeout.seconds, read=self.sse_read_timeout.seconds
|
self.timeout.total_seconds(),
|
||||||
|
read=self.sse_read_timeout.total_seconds(),
|
||||||
),
|
),
|
||||||
) as event_source:
|
) as event_source:
|
||||||
event_source.response.raise_for_status()
|
event_source.response.raise_for_status()
|
||||||
@@ -226,7 +227,7 @@ class StreamableHTTPTransport:
|
|||||||
self.url,
|
self.url,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
timeout=httpx.Timeout(
|
timeout=httpx.Timeout(
|
||||||
self.timeout.seconds, read=ctx.sse_read_timeout.seconds
|
self.timeout.total_seconds(), read=ctx.sse_read_timeout.total_seconds()
|
||||||
),
|
),
|
||||||
) as event_source:
|
) as event_source:
|
||||||
event_source.response.raise_for_status()
|
event_source.response.raise_for_status()
|
||||||
@@ -468,7 +469,8 @@ async def streamablehttp_client(
|
|||||||
async with httpx_client_factory(
|
async with httpx_client_factory(
|
||||||
headers=transport.request_headers,
|
headers=transport.request_headers,
|
||||||
timeout=httpx.Timeout(
|
timeout=httpx.Timeout(
|
||||||
transport.timeout.seconds, read=transport.sse_read_timeout.seconds
|
transport.timeout.total_seconds(),
|
||||||
|
read=transport.sse_read_timeout.total_seconds(),
|
||||||
),
|
),
|
||||||
auth=transport.auth,
|
auth=transport.auth,
|
||||||
) as client:
|
) as client:
|
||||||
|
|||||||
Reference in New Issue
Block a user