Skip to content

Commit

Permalink
Merge pull request #287 from Anthony25/fix_close_fd
Browse files Browse the repository at this point in the history
Close the channel when closing SSH session
  • Loading branch information
einarnn committed Sep 26, 2018
2 parents 3c7d147 + 456619c commit d647a9e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ncclient/transport/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ def close(self):
while self.is_alive() and (self is not threading.current_thread()):
self.join(10)

if self._channel:
self._channel.close()
self._channel = None
self._connected = False

Expand Down

0 comments on commit d647a9e

Please sign in to comment.