Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detach replaced by disconnect #607

Merged
merged 2 commits into from
May 17, 2024
Merged
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
8 changes: 4 additions & 4 deletions fedn/network/clients/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,11 +456,11 @@ def _listen_to_task_stream(self):
details = e.details()
if details == "Token expired":
logger.warning("GRPC TaskStream: Token expired. Reconnecting.")
self.detach()
self.disconnect()

if status_code == grpc.StatusCode.CANCELLED:
# Expected if the client is detached
logger.critical("GRPC TaskStream: Client detached from combiner. Atempting to reconnect.")
# Expected if the client is disconnected
logger.critical("GRPC TaskStream: Client disconnected from combiner. Trying to reconnect.")

else:
# Log the error and continue
Expand Down Expand Up @@ -690,7 +690,7 @@ def _send_heartbeat(self, update_frequency=2.0):

:param update_frequency: The frequency of the heartbeat in seconds.
:type update_frequency: float
:return: None if the client is detached.
:return: None if the client is disconnected.
:rtype: None
"""
while True:
Expand Down
Loading