Skip to content

Commit

Permalink
fix: SSH Connection refused traceback (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse S authored Jan 26, 2024
1 parent 368a0ad commit 49bdbb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/live_cluster/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async def create_connection(self, ip) -> SSHConnection:
async with SSHConnectionFactory.semaphore_host_dict[ip].semaphore:
logger.debug(f"{ip}: Creating connection")
return SSHConnection(await asyncssh.connect(ip, options=self.opts))
except asyncssh.DisconnectError as e:
except (asyncssh.DisconnectError, ConnectionRefusedError) as e:
raise SSHConnectionError(e)
finally:
SSHConnectionFactory.semaphore_host_dict[ip].count -= 1
Expand Down

0 comments on commit 49bdbb3

Please sign in to comment.