Skip to content

Commit

Permalink
detach replaced by disconnect (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahellander authored May 17, 2024
1 parent 0ef3715 commit 5f54d04
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 5f54d04

Please sign in to comment.