mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 05:24:18 +02:00
Preserve init_timeout=0 as disabled (None)
This commit is contained in:
parent
87b4a6fb99
commit
52f5d60440
1 changed files with 3 additions and 2 deletions
|
|
@ -274,10 +274,11 @@ class Client(
|
|||
# Convert timeout to timedelta if needed
|
||||
timeout = normalize_timeout_to_timedelta(timeout)
|
||||
|
||||
# handle init handshake timeout
|
||||
# handle init handshake timeout (0 means disabled)
|
||||
if init_timeout is None:
|
||||
init_timeout = fastmcp.settings.client_init_timeout
|
||||
self._init_timeout = normalize_timeout_to_seconds(init_timeout)
|
||||
init_timeout_seconds = normalize_timeout_to_seconds(init_timeout)
|
||||
self._init_timeout = None if init_timeout_seconds == 0 else init_timeout_seconds
|
||||
|
||||
self.auto_initialize = auto_initialize
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue