You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Client connections not closed on client deletion #1127
client = paramiko.SSHClient('localhost')
client.exec_command('echo me')
del client
Connection still active. Resources not freed.
Creating more clients in same python process leads to memory leaks and eventually OOM.
Cause is client not calling transport.close() at any point.
Sub-classing SSHClient with a __del__ that includes transport.close() leads to race conditions and blocks most definitely related to cyclic references. This has been the case since 1.x and still persists in latest version.
Activity
ploxiln commentedon Nov 23, 2017
Yup. see #964 #949