This commit is contained in:
Alexander Bersenev
2019-08-13 03:31:49 +05:00
parent 4e2cb87685
commit 48330f1e8a

View File

@@ -408,7 +408,7 @@ class FakeTLSStreamWriter(LayeredStreamWriterBase):
self.upstream = upstream
def write(self, data, extra={}):
MAX_CHUNK_SIZE = 65535
MAX_CHUNK_SIZE = 16384
for start in range(0, len(data), MAX_CHUNK_SIZE):
end = min(start+MAX_CHUNK_SIZE, len(data))
self.upstream.write(b"\x17\x03\x03" + int.to_bytes(end-start, 2, "big"))