Skip to content

Commit

Permalink
Merge pull request #1430 from Bastian-Krause/bst/util-ssh-keepalive
Browse files Browse the repository at this point in the history
util/ssh: stop keepalive in disconnect() when existing connection is used
  • Loading branch information
Bastian-Krause authored Jul 1, 2024
2 parents 09bbb34 + 63685d6 commit ccf7a3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion labgrid/util/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,10 @@ def _stop_keepalive(self):
def disconnect(self):
assert self._connected
try:
self._stop_keepalive()

if self._socket:
self._logger.info("Closing SSH connection to %s", self.host)
self._stop_keepalive()
self._stop_own_master()
finally:
self._connected = False
Expand Down

0 comments on commit ccf7a3f

Please sign in to comment.