[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-155]
fix sending of large sftp packet sizes fix a bug where packets larger than about 12KB would cause the session to die on platforms other than osx. turns out that on most platforms, setting a socket timeout also causes timeouts to occur on writes (but not on osx). so on a huge write, once the os buffers were full, paramiko would get a socket.timeout exception when writing, and bail. since the timeout is primarily so we can periodically poll to see if the session has been killed from elsewhere, do that on a timeout but otherwise continue trying to write. large packet sizes (in sftp) should now work.
This commit is contained in:
parent
fead211c5c
commit
3e5bd84cc5
|
@ -889,6 +889,10 @@ class BaseTransport (threading.Thread):
|
||||||
while len(out) > 0:
|
while len(out) > 0:
|
||||||
try:
|
try:
|
||||||
n = self.sock.send(out)
|
n = self.sock.send(out)
|
||||||
|
except socket.timeout:
|
||||||
|
n = 0
|
||||||
|
if not self.active:
|
||||||
|
n = -1
|
||||||
except Exception, x:
|
except Exception, x:
|
||||||
# could be: (32, 'Broken pipe')
|
# could be: (32, 'Broken pipe')
|
||||||
n = -1
|
n = -1
|
||||||
|
|
Loading…
Reference in New Issue