From d32303de5775c3ad42cc32e214b82d7e0ee2cdad Mon Sep 17 00:00:00 2001 From: shortcutme Date: Fri, 13 Oct 2017 01:21:45 +0200 Subject: [PATCH] Increase buffer size for file streaming --- src/Connection/Connection.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Connection/Connection.py b/src/Connection/Connection.py index c0b74c31..75677c0b 100644 --- a/src/Connection/Connection.py +++ b/src/Connection/Connection.py @@ -222,7 +222,7 @@ class Connection(object): while 1: if read_bytes <= 0: break - buff = self.sock.recv(16 * 1024) + buff = self.sock.recv(64 * 1024) if not buff: break buff_len = len(buff) @@ -402,7 +402,6 @@ class Connection(object): if streaming: with self.send_lock: bytes_sent = StreamingMsgpack.stream(message, self.sock.sendall) - message = None self.bytes_sent += bytes_sent self.server.bytes_sent += bytes_sent self.server.stat_sent[stat_key]["bytes"] += bytes_sent