Skip to content

Commit ccf7a3f

Browse files
Merge pull request #1430 from Bastian-Krause/bst/util-ssh-keepalive
util/ssh: stop keepalive in disconnect() when existing connection is used
2 parents 09bbb34 + 63685d6 commit ccf7a3f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

labgrid/util/ssh.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,10 @@ def _stop_keepalive(self):
521521
def disconnect(self):
522522
assert self._connected
523523
try:
524+
self._stop_keepalive()
525+
524526
if self._socket:
525527
self._logger.info("Closing SSH connection to %s", self.host)
526-
self._stop_keepalive()
527528
self._stop_own_master()
528529
finally:
529530
self._connected = False

0 commit comments

Comments
 (0)