diff --git a/syftbox/client/base.py b/syftbox/client/base.py index 0d4d82db..ca12b83d 100644 --- a/syftbox/client/base.py +++ b/syftbox/client/base.py @@ -131,7 +131,7 @@ def from_config( base_url=str(config.server_url), follow_redirects=True, headers=cls._make_headers(config), - timeout=10, + timeout=config.client_timeout, transport=transport, ) return cls(conn) diff --git a/syftbox/lib/client_config.py b/syftbox/lib/client_config.py index fb3f9fc7..640a8fa8 100644 --- a/syftbox/lib/client_config.py +++ b/syftbox/lib/client_config.py @@ -62,6 +62,9 @@ class SyftClientConfig(BaseModel): path: Path = Field(exclude=True, description="Path to the config file") """Path to the config file""" + client_timeout: float = Field(default=5, description="Timeout used by the client connection to the SyftBox server") + """Timeout used by the client connection to the SyftBox server""" + @field_validator("client_url", mode="before") def port_to_url(cls, val: Union[int, str]) -> Optional[str]: if isinstance(val, int):