fs: ssh: pass timeout to paramiko's connect() (#5569)

Prior to this commit, DVC could hang indefinitely when connecting to
remote SSH filesystems. This should address this.
This commit is contained in:
Laurens Duijvesteijn
2021-03-08 22:59:26 +02:00
committed by GitHub
parent d68f6d3696
commit e0a0342ab3
+3 -1
View File
@@ -40,7 +40,9 @@ class SSHConnection:
host=host, **kwargs
)
)
self.timeout = kwargs.get("timeout", 1800)
kwargs.setdefault("timeout", 1800)
self.timeout = kwargs["timeout"]
self._ssh = paramiko.SSHClient()