commit f16adf275c0bff23174a3e3cac47bef130259080 Author: David Fifield david@bamsoftware.com Date: Sun Oct 30 04:37:49 2011 -0700
Increase the connector read size from 1024 to 65536.
Since Flash doesn't provide any way of knowing if sent data was sent successfully or not, it pushes everything it can't send immediately on a buffer of unbounded size. If the receiver can't read the data fast enough, Flash will consume more and more memory until it crashes.
I don't think this will matter much for Tor or even plain Internet connections, but it's crashing my high-speed localhost tests. --- connector.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/connector.py b/connector.py index d763303..624b776 100755 --- a/connector.py +++ b/connector.py @@ -308,7 +308,7 @@ def register():
def proxy_chunk(fd_r, fd_w, label): try: - data = fd_r.recv(1024) + data = fd_r.recv(65536) except socket.error, e: # Can be "Connection reset by peer". log(u"Socket error from %s: %s" % (label, repr(str(e)))) fd_w.close()