summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--paramiko/transport.py4
-rw-r--r--tests/test_transport.py5
2 files changed, 5 insertions, 4 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py
index 406626a7..bda05443 100644
--- a/paramiko/transport.py
+++ b/paramiko/transport.py
@@ -231,8 +231,8 @@ class Transport (threading.Thread):
self.channel_events = {} # (id -> Event)
self.channels_seen = {} # (id -> True)
self._channel_counter = 1
- self.window_size = 65536
- self.max_packet_size = 34816
+ self.max_packet_size = 2 ** 15
+ self.window_size = 64 * self.max_packet_size
self._forward_agent_handler = None
self._x11_handler = None
self._tcp_handler = None
diff --git a/tests/test_transport.py b/tests/test_transport.py
index 485a18e8..d84747b6 100644
--- a/tests/test_transport.py
+++ b/tests/test_transport.py
@@ -585,12 +585,13 @@ class TransportTest(ParamikoTest):
self.assertEqual(chan.send_ready(), True)
total = 0
K = '*' * 1024
- while total < 1024 * 1024:
+ limit = 1+(64 * 2 ** 15)
+ while total < limit:
chan.send(K)
total += len(K)
if not chan.send_ready():
break
- self.assertTrue(total < 1024 * 1024)
+ self.assertTrue(total < limit)
schan.close()
chan.close()