Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion framework/py/flwr/common/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def try_obtain_root_certificates(
else:
# Load the certificates if provided, or load the system certificates
if root_cert_path is None:
log(INFO, "Using system certificates")
log(INFO, "Using system certificates for TLS connection")
root_certificates = None
elif not isfile(root_cert_path):
log(ERROR, "Path argument `--root-certificates` does not point to a file.")
Expand Down
9 changes: 7 additions & 2 deletions framework/py/flwr/common/retry_invoker.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import time
from collections.abc import Callable, Generator, Iterable
from dataclasses import dataclass
from logging import INFO, WARN
from logging import ERROR, INFO, WARN
from typing import Any, cast

import grpc
Expand Down Expand Up @@ -351,7 +351,12 @@ def _should_giveup_fn(e: Exception) -> bool:
if e.code() == grpc.StatusCode.PERMISSION_DENIED: # type: ignore
raise RunNotRunningException
if e.code() == grpc.StatusCode.UNAVAILABLE: # type: ignore
return False
# Check if this is an SSL handshake failure - these should fail fast
details = str(e.details() if hasattr(e, "details") else "").lower()
if "handshake failed" in details:
log(ERROR, "SSL/TLS handshake error detected.")
return True # Give up on SSL/TLS handshake errors
return False # Retry on other UNAVAILABLE errors (network issues)
return True

def _wait(wait_time: float) -> None:
Expand Down
Loading