Skip to content

Commit

Permalink
Add timeout to internal_start_client
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbvll committed Jan 17, 2024
1 parent 56fdf1e commit 89c24a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/py/flwr/client/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ class `flwr.client.Client` (default: None)
root_certificates=root_certificates,
insecure=insecure,
transport=transport,
timeout=timeout,
)
event(EventType.START_CLIENT_LEAVE)

Expand All @@ -255,6 +256,7 @@ def _start_client_internal(
root_certificates: Optional[Union[bytes, str]] = None,
insecure: Optional[bool] = None,
transport: Optional[str] = None,
timeout: int = TRANSPORT_TIMEOUT_DEFAULT,
) -> None:
"""Start a Flower client node which connects to a Flower server.
Expand Down Expand Up @@ -290,6 +292,8 @@ class `flwr.client.Client` (default: None)
- 'grpc-bidi': gRPC, bidirectional streaming
- 'grpc-rere': gRPC, request-response (experimental)
- 'rest': HTTP (experimental)
timeout : int (default: 60)
A timeout (in seconds) for making requests to the server.
"""
if insecure is None:
insecure = root_certificates is None
Expand Down

0 comments on commit 89c24a0

Please sign in to comment.