potiuk commented on code in PR #40377:
URL: https://github.com/apache/airflow/pull/40377#discussion_r1650162379


##########
airflow/providers/ssh/operators/ssh.py:
##########
@@ -198,3 +198,9 @@ def tunnel(self) -> None:
         """Get ssh tunnel."""
         ssh_client = self.hook.get_conn()  # type: ignore[union-attr]
         ssh_client.get_transport()
+
+    def on_kill(self) -> None:
+        """Close the ssh client session."""
+        ssh_client = self.hook.get_conn()

Review Comment:
   This is how get_conn() look like now:
   
   ```python
       def get_conn(self) -> paramiko.SSHClient:
           ....
           client = paramiko.SSHClient()
           ...
           self.client = client
           return client
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to